示例#1
0
        public void AddNewMenu(MenuForCreationVm menuModel)
        {
            Menu menu = _mapper.Map <Menu>(menuModel);

            menu.Products = AddListOfProducts(menuModel.ProductsIds);
            _menuRepository.AddNewMenu(menu);
        }
示例#2
0
        public IActionResult AddNewMenu(MenuForCreationVm menuModel)
        {
            if (menuModel.Btn == "Submit")
            {
                _menuService.AddNewMenu(menuModel);
            }

            return(RedirectToAction("index"));
        }