are there any good tutorials online for learning about the c# 2.0 language feature "predicates"?
i'm trying to learn how to use predicates along with linq to sql to modify my queries
what i am trying to do is query a table of customers and filter it based on changing criteria. for example
- find all customers who have zipcode = 90210
- find all customers who are male
- find all customers who are male AND > have zipcode = 90210
right now i am doing this using if/else statements which feels pretty wrong
also, it's possible that i'll have to add other filters so i want a flexible solution to this problem that's easy to extend without breaking anything (open closed principle i think)