What is in
and not in
equals in LINQ to SQL?
For example
select * from table in ( ...)
and
select * from table not in (.
You use, where
.Contains(
var myProducts = from p in db.Products
where productList.Contains(p.ProductID)
select p;
Or you can have a list predefined as such:
int[] ids = {1, 2, 3};
var query = from item in context.items
where ids.Contains( item.id )
select item;
For the 'NOT' case, just add the '!' operator before the 'Contains' statement.