Beispiel #1
0
 public IActionResult EditMeal(int mealId)
 {
     try
     {
         var model = _repository.GetMeal(mealId);
         if (model == null)
         {
             throw new Exception("Нет такой еды)");
         }
         ViewBag.Product = _repository.GetProductsSelectList();
         return(View("EditMeal", model));
     }
     catch (Exception ex)
     {
         return(View("Error", ex));
     }
 }