Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要使用 CategoryId = 75 和(BrandId = 12 或 BrandId = 3)的过滤器过滤数据,但等效的 Linq to Entity
假设 C# 和相同命名的列,您可以使用以下方法过滤上下文:
.Where(w=>w.CategoryId==75 && (w.BrandId==12 || w.BrandId==3))