Beispiel #1
0
        public void DeleteProductAttributeMapping(int productAttributeMappingId)
        {
            //Get productAttributeMapping by id.
            var productAttributeMapping = productAttributeMappingRepository.GetById(productAttributeMappingId);

            if (productAttributeMapping != null)
            {
                productAttributeMappingRepository.Delete(productAttributeMapping);
                SaveProductAttributeMapping();
            }
        }
Beispiel #2
0
        /// <summary>
        /// Deletes a product attribute mapping
        /// </summary>
        /// <param name="productAttributeMapping">Product attribute mapping</param>
        public virtual void DeleteProductAttributeMapping(ProductAttributeMapping productAttributeMapping)
        {
            if (productAttributeMapping == null)
            {
                throw new ArgumentNullException("productAttributeMapping");
            }

            _productAttributeMappingRepository.Delete(productAttributeMapping);

            //cache
            _cacheManager.GetCache(CACHE_NAME_PRODUCTATTRIBUTES).Clear();
            _cacheManager.GetCache(CACHE_NAME_PRODUCTATTRIBUTEMAPPINGS).Clear();
            _cacheManager.GetCache(CACHE_NAME_PRODUCTATTRIBUTEVALUES).Clear();
            _cacheManager.GetCache(CACHE_NAME_PRODUCTATTRIBUTECOMBINATIONS).Clear();

            //event notification
            //_eventPublisher.EntityDeleted(productAttributeMapping);
        }