How does PredicateBuilder work

Let’s say you have: Expression<Func<Person, bool>> isAdult = p1 => p1.Age >= 18; // I’ve given the parameter a different name to allow you to differentiate. Expression<Func<Person, bool>> isMale = p2 => p2.Gender == “Male”; And then combine them with PredicateBuilder var isAdultMale = isAdult.And(isMale); What PredicateBuilder produces is an expression that looks like this: … Read more