示例#1
0
        public async Task <bool> DeleteEntityAsync(Guid id)
        {
            if (!await _repository.EntityExistsAsync(id))
            {
                throw new NotFoundException();
            }

            return(await _repository.RemoveEntity(id));
        }
示例#2
0
        public async Task <bool> DeleteEntityAsync(Guid id)
        {
            if (!await _repository.EntityExistsAsync(id))
            {
                return(false);
            }

            return(await _repository.RemoveEntity(id));
        }