views:

262

answers:

1

Order by descending is not working on LINQ to Entity In the following Query In place of ascending If I keep descending it is not working. Please help me out

var hosters =
    from e in context.Hosters_HostingProviderDetail
    where e.ActiveStatusID == pendingStateId
    orderby e.HostingProviderName ascending
    select e;

return hosters.ToList();
+1  A: 

This should return correct result. It is working fine for me.

var hosters = 
from e in context.Hosters_HostingProviderDetail 
where e.ActiveStatusID == pendingStateId 
orderby e.HostingProviderName **descending**
select e; 

return hosters.ToList();
Tulika
Ok, Thanks.......
Vinni