How to use PredicateBuilder with nested OR conditionals in Linq
- by tblank
I've been very happily using PredicateBuilder but until now have only used it for queries with only either concatenated AND statements or OR statements. Now for the first time I need a pair of OR statements nested along with a some AND statements like this:
select x from Table1 where a = 1 AND b = 2 AND (z = 1 OR y = 2)
Using the documentation…