I have a list that I want to generate a query from. I need to get back the items that match each entry in my list and the list uses two values to match against the database. Manually created code would be like this pattern...
from x in Context.Items
where (x.Prop1 == 5 && x.Prop2 == "Foo") ||
(x.Prop1 == 2 && x.Prop2 == "Bar") ||
(x.Prop1 == 9 && x.Prop2 == "Etc")
select x
If I only wanted to compare a single property I would just use the 'list.Contains(x => x.Prop1)' approach but I need to compare on two values and not one. Any ideas?