public virtual ActionResult Create(CustomerViewModel model)
 {
     if (ModelState.IsValid)
     {
         _customerHandler.Add(model.CreateCustomerDomain());
         _customerHandler.Commit();
         return(RedirectToAction("Index"));
     }
     return(View(model));
 }
示例#2
0
 public virtual ActionResult Create(ProductViewModel model)
 {
     if (ModelState.IsValid)
     {
         _productHandler.Add(model.CreateProductDomain());
         _productHandler.Commit();
         return(RedirectToAction("Index"));
     }
     return(View(model));
 }