예제 #1
0
 public virtual ActionResult Edit([Bind(Include = "Id,Name")] CustomerViewModel model)
 {
     if (ModelState.IsValid)
     {
         _customerHandler.Update(model.CreateCustomerDomain());
         _customerHandler.Commit();
         return(RedirectToAction("Index"));
     }
     return(View(model));
 }
예제 #2
0
 public virtual ActionResult Create(CustomerViewModel model)
 {
     if (ModelState.IsValid)
     {
         _customerHandler.Add(model.CreateCustomerDomain());
         _customerHandler.Commit();
         return(RedirectToAction("Index"));
     }
     return(View(model));
 }