Wednesday, April 16, 2008

translate 'In' operator in SQL to LINQ

Just found out there is no 'In' in LINQ, instead there is an ANY in LINQ:
e.g.
var abc=
from d in mydb.department
where mydb.employee.Any(e => e.ProductID == d.ManagerId)
select d;

No comments: