// 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)); }
// GET: Recipe public ActionResult Index() { var recipeList = _recipeManager.GetAll(); var listOfIngredientsViewModels = _mapper.Map <IList <RecipeViewModel> >(recipeList); return(View(listOfIngredientsViewModels)); }