これは私のコードで、簡単にするために大幅に省略されています
Func<Product, bool> selector;
...
selector = p => p.IsNew;
...
if(negative) // not selector
selector = x => !selector(x); // This is wrong (causes infinite loop)
// How do you do negate it? The result should be p => !p.IsNew
...
IEnumerable<Product> products = MyContext.Products.Where(selector);