public ActionResult Details(int id) { try { var entree = EntreeManager.GetAll().First(x => x.ID == id); return(View(entree)); } catch (Exception ex) { TempData["ErrorMessage"] = "No Entree with ID " + id.ToString() + " exists."; return(RedirectToAction("Index")); } }
public ActionResult Index() { var entrees = EntreeManager.GetAll(); return(View(entrees)); }