Quantcast
Channel: ADO.NET, Entity Framework, LINQ to SQL, NHibernate
Viewing all articles
Browse latest Browse all 1698

creating an ef query on an array

$
0
0

I have a Poco class called Product. I also have an array which contains ids of Products which I would love to find. I want a way I can write a single query that would help find Products based on the ids in the int  array.

I am trying to do it in the best posible way. I dont want to use some unneccessary loops.

this.context.Products.Where (item=>item.ProductID == ........ ids in the array woould come here  ......).AsEnumerable();

Please how do I get this to work. Thanks for reading.


Viewing all articles
Browse latest Browse all 1698

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>