I use LINQ to create my where clause like so:
var query = from x in context.Xs
select x;
if (y == ...)
{
query = query.Where(x => x.Y == 1);
}
I have bunch of these "if .... where" statements. The issue I have is that all of those wheres join where clauses using AND but I need all my where clauses to use OR. Is there an easy way to port this code into where OR code? Or even what is the easiest way to do this with OR?
Thanks.