Пример #1
0
        public async Task DeleteAsync(CategoryId categoryId)
        {
            var exists = await _repository.ExistsAsync(categoryId);

            if (!exists)
            {
                throw new NotFoundException <CategoryId>(categoryId);
            }

            await _repository.DeleteAsync(categoryId);
        }