public ActionResult Add(StudentViewModel student) { if (ModelState.IsValid) { _studentApplicationService.AddStudent(student); } return View(student); }
public Domain.Student AddStudent(StudentViewModel studentViewModel) { if (studentViewModel == null) { throw new ArgumentNullException("studentViewModel"); } var student = Mapper.Map<Domain.Student>(studentViewModel); _session.Store(student); return student; }
public ActionResult Add() { var student = new StudentViewModel(); return View(student); }