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