// GET: Menu/Create public ActionResult Create() { var newMenu = new MenuCreateViewModel(); var recipeModelsDropdownList = _recipeManager.GetAll(); var recipeViewModelsDropdownList = _mapper.Map <List <RecipeViewModel> >(recipeModelsDropdownList); newMenu.RecipeViewModelsDropdownList = recipeViewModelsDropdownList; newMenu.Days = _mapper.Map <List <DayViewModel> >(_dayManager.GetAll()); return(View(newMenu)); }
public IActionResult Create() { ViewBag.DepartmentId = new SelectList(_departmentManager.GetAll(), "DepartmentId", "DepartmentName"); ViewBag.RoomId = new SelectList(_roomManager.GetAll(), "RoomId", "RoomNo"); ViewBag.DayId = new SelectList(_dayManager.GetAll(), "DayId", "DayName"); return(View()); }