コード例 #1
0
        public async Task <ActionResult> DeleteSchoolByIdAsync(string id)
        {
            var school = await schoolRepository.GetSchoolByIdAsync(id);

            if (school == null)
            {
                return(NotFound($"Could not find school with id = {id}"));
            }

            await schoolRepository.DeleteSchoolByIdAsync(id);

            return(NoContent());
        }