예제 #1
0
        public IActionResult DeleteCatalogueCourse(int schoolId, int catalogueId, int courseId)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }
            Course course = _schoolRepository.GetCatalogueCourse(courseId, schoolId, catalogueId);

            if (course == null)
            {
                return(NotFound());
            }
            _schoolRepository.DeleteCatalogueCourse(course, schoolId, catalogueId);
            return(NoContent());
        }