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