Author: zhu928 | Posted on: 6/2/2009 11:57:14 AM | Views : 846

Hi, I want to know if it is possible to use a string as the where clause in a LINQ select. I have where clause stored in the database and i want it to be append into the LINQ selection dynamically. so something like following:
string whereClause = GetFromDB(); // the return will be something like "categoryID=2"
var q = from p in product where whereClause select p.name
 
this query will return me a list of product name belonging to a same category. 

...

Go to the complete details ...