public IActionResult DeleteDocument(int schoolId, int courseId, int documentId) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } Document document = _schoolRepository.GetDocument(documentId, schoolId, courseId); if (document == null) { return(NotFound()); } _schoolRepository.DeleteDocument(document, schoolId, courseId); return(NoContent()); }