Beispiel #1
0
        public IActionResult DeleteCatalogueMentor(int schoolId, int catalogueId, int mentorId)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }
            Mentor mentor = _schoolRepository.GetCatalogueMentor(mentorId, schoolId, catalogueId);

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