LINQ的IN:
var queryResult = from p in db.Products where (new int?[] {1,2}).Contains(p.CategoryID) select p;
LINQ的NOT IN:
var queryResult = from p in db.Products where ! (new int?[] {1,2}).Contains(p.CategoryID) select p;
原文:http://www.cnblogs.com/shanoon/p/5421027.html