public ActionResult Add(PersonModel model) { if (this.SaveObject<IPerson>(model.ModelObject) != null) { return this.RedirectToAction("Index"); } return this.View(model); }
public ActionResult Add() { var model = new PersonModel(this.PersonFactory.Create()); return this.View(model); }
public ActionResult Edit(int id) { var model = new PersonModel(this.PersonFactory.Fetch(id)); return this.View(model); }