public IActionResult AddMeal(int weekId, int dayId) { try { var meal = _repository.AddMeal(new Meal { WeekId = weekId, DayId = dayId }); //ViewBag.Product = _repository.GetProductsSelectList(); var day = _repository.GetDay(dayId); return(RedirectToAction("EditDay", new { weekId = weekId, dayName = day.DayName })); } catch (Exception ex) { return(View("Error", ex)); } }