Advertisement
krasipetrovbg

Untitled

Jan 27th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.25 KB | None | 0 0
  1. public List<Category> categories()
  2. {
  3.   IQueryable<Category> categories = db.Categories;
  4.   categories = categories.OrderByDescending(c => c.categoryId);
  5.   return categories.ToList();
  6. }
  7.  
  8. public HomeController()
  9. {
  10.   DataSend.categories = categories();
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement