public IActionResult EditDish(int dishId) { try { var dish = _repository.GetDish(dishId); var model = _repository.GetMeal(dish.MealId); ViewBag.DishId = model.Dishes.IndexOf(dish); ViewBag.Product = _repository.GetProductsSelectList(); return(View("_AddMeal", model)); } catch (Exception ex) { return(View("Error", ex)); } }