Hi , I want to build dynamic search query with subsonic 3.0. who can help me? Any sample Please.
A:
Basically all you need to do is add conditions to an IQueryable based on your dynamic parameters. For example:
string productName = Request.Querystring[ProductName];
IQueryable<Product> productQuery = Product.All();
if(productName != null)
{
productQuery = productQuery.Where(product => product.Name == productName);
}
IList<Product> filteredList = productQuery.ToList();
Adam
2010-01-17 15:44:42
Thanks a lot, i will try as you mention
maung
2010-01-17 16:13:11