public ActionResult Save(PersonalInformationViewModel model) { if (!ModelState.IsValid) return View("Index", model); Person person = Mapper.Map<PersonalInformationViewModel, Person>(model); return RedirectToAction("Index", "AddressInformation"); }
public ActionResult Index() { var fields = Fields .Where(field => field.AppliesToPage(PageName.PersonalInformation)) .OrderBy(field => field.FieldOrder()) .ToList(); var model = new PersonalInformationViewModel {Fields = fields}; return View(model); }