I am going to build a search function today, c# asp.net. i need a push go get it rolling. i use nhibernate linq. it would be nice to do this with linq query. it need to be kinda dynamic, i am going to have several search criterias like gender, email, name, age and some more.
this search query is only going to my customer object.
how could i do this? and how is this done the right way?
the way i think now is that i get a iqueryable and perform queryies to that. i think like this that e.g for the gender i got two checkboxes, so i perform a if male is check i do a where.gender == "Male" and if none is checked i do nuthing. but is this the way to do this for every query? because some is user input to like name, email, age.
please advice me on this