c# - Sort generic list descending order -


i have method in controller

   public actionresult index()     {         return view(db.posts.tolist());     } 

how can list in descending order? instead of starting id:1 starts @ last id in table

public actionresult index()     {         return view(db.posts.orderbydescending(p => p.id).tolist());     } 

Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

Php - Delimiter must not be alphanumeric or backslash -

Delphi interface implements -