public async Task DeleteAsync(Guid id) { var entity = await _demoRepository.GetByKeyAsync(id); if (entity == null) { throw new NotFoundEntityException("示例"); } await _demoRepository.DeleteAsync(entity); }
public async Task DeleteAsync(Guid id) { var entity = await _demoRepository.GetByKeyAsync(id); if (entity == null) { throw new NotFoundEntityException("示例"); } await _demoRepository.DeleteAsync(entity); }