NickMalloy
asked on
linq query with dynamic where's
I am passing in the possibility of 7 parameters into a function
public string GetFilter(string Var1, string Var2, string Var3, string Var4, string Var5, string Var6, string Var7)
The vars will not always have a value. The Var could be "". I want to build a linq query where my where clause uses the Var if it contains a value. What's the best way to accomplish this with the least amount of code overhead.
public string GetFilter(string Var1, string Var2, string Var3, string Var4, string Var5, string Var6, string Var7)
The vars will not always have a value. The Var could be "". I want to build a linq query where my where clause uses the Var if it contains a value. What's the best way to accomplish this with the least amount of code overhead.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.