Ejemplo n.º 1
0
        public IActionResult DeleteCatalogue(int schoolId, int catalogueId)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }
            Catalogue catalogue = _schoolRepository.GetCatalogue(catalogueId, schoolId);

            if (catalogue == null)
            {
                return(NotFound());
            }
            _schoolRepository.DeleteCatalogue(catalogue, schoolId);
            return(NoContent());
        }