public ActionResult AddMenu(FormCollection form) { string cookie = Request.Cookies["company"].Value; Menu menu = new Menu() { CompanyID = _companyDal.GetCompanyByCookie(cookie).ID, MenuName = form["name"], MenuDetail = form["detail"], Price = Convert.ToDecimal(form["price"]) }; _menuDal.Add(menu); return(RedirectToAction("Menus")); }
public void Add(Menu menu) { _menuDal.Add(menu); }
public void Add(Entities.Menu entity) { _menuDal.Add(entity); }
public Menu Add(Menu model) { return(_mapper.Map <Menu>(_menuDal.Add(model))); }