Пример #1
0
        // GET: Menu/Details/5
        public ActionResult Details(int id)
        {
            MenuModel menuModel = _menuManager.FindById(id);

            if (menuModel == null)
            {
                return(HttpNotFound());
            }

            var menuViewModel = _mapper.Map <MenuViewModel>(menuModel);

            menuViewModel.Days = _mapper.Map <List <DayViewModel> >(_dayManager.GetAll());

            return(View(menuViewModel));
        }