Exemplo n.º 1
0
 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"));
     }
 }
Exemplo n.º 2
0
        public ActionResult Index()
        {
            var entrees = EntreeManager.GetAll();

            return(View(entrees));
        }