public ActionResult Manage(Customer customer) { this.Validate(customer); if (ModelState.IsValid) { //Do something with the valid entity. return View(); } else return View(customer); }
public ActionResult Manage(FormCollection form) { var customer = new Customer(); UpdateModel(customer); this.Validate(customer); if (ModelState.IsValid) { //Do something with the valid entity. return View(); } else return View(customer); }