-1

I need to filter entity with LINQ by collection of IDs. What I am trying to do better explains following sql query:

 select * from Person where PersonID in (1,2,3) 

I have List collection which contain collection of IDs and need to retrieve all persons with same ID like in collection.

Thanks

0

1 Answer 1

2
myList.Where(item => ids.Contains(item)).ToList() 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.