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