I want to get all records WHERE (s.override == 1 OR (s.override == 2 AND s.approved == 1))
How can I do that using the .Where x.subcontracts.Where(s ==> ??)
I want to get all records WHERE (s.override == 1 OR (s.override == 2 AND s.approved == 1))
How can I do that using the .Where x.subcontracts.Where(s ==> ??)
Use standard C# binary operators:
x.subcontracts
.Where(s => s.override == 1 || (s.override == 2 && s.approved == 1))
Here is the where clause you need:
x.subcontracts.Where(s => (s.override == 1) || (s.override == 2 && s.approved == 1))