Exemple #1
0
        // 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));
        }
Exemple #2
0
        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());
        }