public Course update(Course newCourse) { Course oldCourse = _repository.get(newCourse.IDCourse); if (oldCourse == null) { return(null); } oldCourse = CourseMapper.mapModel(oldCourse, newCourse); if (oldCourse == null) { return(null); } _repository.update(oldCourse); return(oldCourse); }