public ActionResult AddPerson(PersonModel model) { if (ModelState.IsValid) { //Add Person. } return JsonView(ModelState.IsValid, "_AddPerson", model); }
public ActionResult AddPerson() { var model = new PersonModel { Id = 1, Name = "Hernán" }; return PartialView("_AddPerson", model); }
public ActionResult AddPersonThrowsException(PersonModel model) { throw new NotImplementedException(); }