public ActionResult CreateProduct(CreateProductViewModel product) { if (!ModelState.IsValid) { return(View()); } if (MenuService.CreateProduct(product.ToEntity())) { return(RedirectToAction("index", "menu")); } return(View()); }
public Products Convert(CreateProductViewModel model) { return(model.ToEntity()); }