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

Php - Delimiter must not be alphanumeric or backslash -

c# - How to change the "Applies To" field under folder auditing options programatically (.NET) -

c++ - Ambiguity when using boost::assign::list_of to construct a std::vector -