示例#1
0
        public async Task DeleteById(int id)
        {
            var item = await _repository.GetOneByIdAsync(id);

            if (item is null)
            {
                throw new NotFoundException(ExceptionMessageUtil.NOT_FOUND);
            }

            await _repository.DeleteAsync(item);
        }