In my last project i decided to use Entity Framework and it was all going well until i try to get datas with "where in", i got an error.
After a tiny search i ve come up with this post and that post.
This is what i am trying to do
var all = fooelements
.Where(l=>controlsToGet
.Contains(l.Control.Name));
Is there any to handle it with lambda expressions or linq with the Entity Framework ?
Thank you
Building upon the previous answer I have a tip that makes it easy to do this here:
Tip 8 - How to write 'WHERE IN' style queries using LINQ to Entities
Hope this helps
Alex James
Program Manager - Entity Framework Team
Entity Framework Tips
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With