// POST Student/CreateStudent public JsonResult CreateStudent(StudentDto student) { if (student != null) { studentRepository.Add(student.ToNewStudent()); unitOfWork.SaveChanges(); return(Json(new { success = true })); } return(Json(new { success = false })); }