コード例 #1
0
        public ActionResult Create(Person person)
        {
            if(ModelState.IsValid)
            {

                UpdateModel(person);

                _personRepository.Save(person);
                _personRepository.Commit();
                return RedirectToAction("Index");
            }

            return View(person);
        }
コード例 #2
0
 public void Update(Person person)
 {
     if (person == null) throw new ArgumentNullException("person");
     _session.Update(person);
 }
コード例 #3
0
ファイル: Book.cs プロジェクト: PeterLehmann/SmFluentNhSample
 public Book(int isbn, Person author)
 {
     Isbn = isbn;
     Author = author;
 }
コード例 #4
0
 public ActionResult Create()
 {
     var person = new Person();
     return View(person);
 }