Example #1
0
 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;
        }
Example #3
0
 public ActionResult Add()
 {
     var student = new StudentViewModel();
     return View(student);
 }