Ejemplo n.º 1
0
        public bool DeleteAsync(int id)
        {
            if (id <= 0)
            {
                throw new ArgumentException("id错误");
            }

            return(_schoolRepository.DeleteAsync(id));
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> DeleteHomeWork(int id)
        {
            var entity = await _schoolRepository.DeleteAsync(id);

            if (!entity)
            {
                return(NotFound(new { error = "Invalid Id" }));
            }
            return(Ok());
        }
Ejemplo n.º 3
0
 public async Task DeleteAsync(Guid id)
 {
     await _repository.DeleteAsync(id);
 }