public bool DeleteAsync(int id) { if (id <= 0) { throw new ArgumentException("id错误"); } return(_schoolRepository.DeleteAsync(id)); }
public async Task <IActionResult> DeleteHomeWork(int id) { var entity = await _schoolRepository.DeleteAsync(id); if (!entity) { return(NotFound(new { error = "Invalid Id" })); } return(Ok()); }
public async Task DeleteAsync(Guid id) { await _repository.DeleteAsync(id); }