// GET: Home public ActionResult Index() { //TempData //if (TempData["modelCat"] != null) //{ // return View(TempData["modelCat"] as List<Note>); //} NotesManager NoteMan = new NotesManager(); return(View(NoteMan.GetAllNotes().OrderByDescending(x => x.ModifiedOn).ToList())); // return View(NoteMan.GetAllNotesQueryable().OrderByDescending(x => x.ModifiedOn).ToList()); }
public ActionResult MostLiked() { NotesManager noteMan = new NotesManager(); return(View("Index", noteMan.GetAllNotes().OrderByDescending(x => x.LikeCount).ToList())); }