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.
我想获取所有记录 WHERE (s.override == 1 OR (s.override == 2 AND s.approved == 1))
我怎样才能使用 .Wherex.subcontracts.Where(s ==> ??)
x.subcontracts.Where(s ==> ??)
使用标准 C# 二元运算符:
x.subcontracts .Where(s => s.override == 1 || (s.override == 2 && s.approved == 1))
这是您需要的 where 子句:
x.subcontracts.Where(s => (s.override == 1) || (s.override == 2 && s.approved == 1))