I am creating an application that searches the database and allows the user to dynamically add any criteria (around 50 possible), much like the following SO question: Creat
You're probably looking for something like Predicate Builder which allows you to control the AND's and OR's of the where statement easier.
There's also Dynamic Linq which allows you to submit the WHERE clause like a SQL string and it will parse it into the correct predicate for a WHERE.