LINQ的NOT IN:
var queryResult = from p in db.Productswhere ! (new int?[] {1,2}).Contains(p.CategoryID)select p;
var queryResult = from p
in
db.Products
where ! (
new int
?[] {1,2}).Contains(p.CategoryID)
select p;