Luke101
Luke101

Reputation: 65298

Does Entity Framework 4 have a Contains feature?

Right now I am using an extension to linq to provide me with the functionality of Contains. I call the WhereIn like this:

Answers = Answers.WhereIn(x => x.category.catid, catSTRarray);

Is there a built in function within entity framework to use?

Upvotes: 4

Views: 811

Answers (1)

Raj Kaimal
Raj Kaimal

Reputation: 8304

pseudo code

Answers.Where(x => catSTRarray.Contains(x.category.catid)); 

Upvotes: 4

Related Questions