예제 #1
0
        public IActionResult DeleteMentor(int schoolId, int mentorId)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }
            Mentor mentor = _schoolRepository.GetMentor(mentorId, schoolId);

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