public ActionResult AddStudent(StudentModel model) { _studentService.AddStudent(model.SchoolClassEntityId, _mappingEngine.Map<StudentEntity>(model)); return RedirectToAction("ViewSchoolClass", "SchoolClass", model.SchoolClassEntityId); }
public ActionResult AddStudent(int schoolClassEntityId) { var model = new StudentModel() {SchoolClassEntityId = schoolClassEntityId}; return View(model); }