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);
 }
Beispiel #3
0
 public Book(int isbn, Person author)
 {
     Isbn = isbn;
     Author = author;
 }
 public ActionResult Create()
 {
     var person = new Person();
     return View(person);
 }