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

java - How to create Table using Apache PDFBox -

mpi - Why is MPI_Bsend not returning error even when the buffer is insufficient to accommodate all the messages -