Posted on: 9/3/2012 3:29:30 AM | Views : 381


var productlist = (from product in repo.Get<Products>().ToList()
join category in repo.Get<ProductCategory>().ToList()
on product.ProductID equals category.ProductID
join categoryNode in repo.Get<CategoryNode>().ToList()
on category.CategoryID equals categoryNode.CategoryID
where categoryNode.CatalogID == CatalogRepository.CatalogConfig.CatalogID
&& categoryNode.CategoryID == categoryID
select product).Distinct(); 
how to i short by asscending and descending order by price(price is in product table)
ex
if(sort==1)
{
to do ascending by price
}
if(sort==2)
{
to do descending by price
}


thanks in advance
...

Go to the complete details ...