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? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -