Exemple #1
0
        public void DeleteCategory(int categoryId)
        {
            if (categoryId > 0)
            {
                Category category = GetCategoryById(categoryId);
                _categoryRepository.DeleteCategory(categoryId);

                if (category.ParentId == 0)
                {
                    _cacheProvider.DeleteFromCache(KEYINCACHE);
                    List <Category> categories = GetTopCategories();
                    _cacheProvider.InsertIntoCache(KEYINCACHE, categories);
                }
            }
        }