Example #1
0
        public void CreateRecordForCatalog(Catalog catalog)
        {
            if (catalog.GenericCatalog == null) return;
            foreach (var attribute in catalog.GenericCatalog.Attributes)
            {
                if (!catalog.CatalogAttributeRecord.Any(x => x.AttributeId == attribute.Id) || catalog.CatalogAttributeRecord == null)
                {
                    var record = new CatalogAttributeRecord
                    {
                        Id = Guid.NewGuid(),
                        CatalogId = catalog.Id,
                        AttributeId = attribute.Id,
                        Value = ""
                    };
                    InsertCatalogAttributeRecord(record);
                }

            }
        }
Example #2
0
        public void DeleteCatalogAttributeRecord(CatalogAttributeRecord catalogAttributeRecord)
        {
            if (catalogAttributeRecord == null)
                throw new ArgumentNullException("catalogAttributeRecord");

            _catalogAttributeRecordRepository.Delete(catalogAttributeRecord);

            _cacheManager.RemoveByPattern(CATALOGATTRIBUTERECORD_BY_ID);
            _cacheManager.RemoveByPattern(CATALOGATTRIBUTERECORD_ALL);
        }