public ActionResult Create(Person person) { if(ModelState.IsValid) { UpdateModel(person); _personRepository.Save(person); _personRepository.Commit(); return RedirectToAction("Index"); } return View(person); }
public void Update(Person person) { if (person == null) throw new ArgumentNullException("person"); _session.Update(person); }
public Book(int isbn, Person author) { Isbn = isbn; Author = author; }
public ActionResult Create() { var person = new Person(); return View(person); }