Пример #1
0
        public DeleteCategoryResponse DeleteCategory(DeleteCategoryRequest categoryRequest)
        {
            var category = _categoryRepository.FindCategoryById(categoryRequest.Id);

            _categoryRepository.DeleteCategory(category);
            var categoryDto = _messageMapper.MapToCategroyDto(category);

            return(new DeleteCategoryResponse
            {
                Category = categoryDto
            });
        }