Пример #1
0
        public async Task <IActionResult> Delete(int collegeId)
        {
            var college = await _collegeRepository
                          .LoadEntitiesAsIQueryable(x => x.CollegeId == collegeId)
                          .FirstOrDefaultAsync();

            if (college == null)
            {
                return(NotFound());
            }
            await _collegeRepository.DeleteEntityAsync(college);

            return(NoContent());
        }