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()); }