I want to search my db with different keys. According to the input, there may be 1 key to 10 keys. Is there a way to add OR/AND clauses to my Linq query dynamically?
You can do something like this. Remember it may casue some overhead
var students = ctx.Students;
if (!String.IsNullOrWhiteSpace(SearchParams.Name))
students = from s in students where s.Name.StartsWith(SearchParams.Name)
if (!String.IsNullOrWhiteSpace(SearchParams.Surname))
students = from s in students where s.Surname.StartsWith(SearchParams.Surname)