Ejemplo n.º 1
0
 public void UpdateValueLocales(ExtendedAttributeValue extendedAttributeValue, ExtendedAttributeValueModel model)
 {
     foreach (var localized in model.Locales)
     {
         _localizedEntityService.SaveLocalizedValue(extendedAttributeValue,
                                                    x => x.Name,
                                                    localized.Name,
                                                    localized.LanguageId);
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Updates the extended attribute value
        /// </summary>
        /// <param name="extendedAttributeValue">Extended attribute value</param>
        public virtual void UpdateExtendedAttributeValue(ExtendedAttributeValue extendedAttributeValue)
        {
            if (extendedAttributeValue == null)
            {
                throw new ArgumentNullException("extendedAttributeValue");
            }

            _extendedAttributeValueRepository.Update(extendedAttributeValue);

            _cacheManager.RemoveByPattern(EXTENDEDATTRIBUTES_PATTERN_KEY);
            _cacheManager.RemoveByPattern(EXTENDEDATTRIBUTEVALUES_PATTERN_KEY);

            //event notification
            _eventPublisher.EntityUpdated(extendedAttributeValue);
        }
Ejemplo n.º 3
0
 public static ExtendedAttributeValue ToEntity(this ExtendedAttributeValueModel model, ExtendedAttributeValue destination)
 {
     return(Mapper.Map(model, destination));
 }
Ejemplo n.º 4
0
 //checkout attribute values
 public static ExtendedAttributeValueModel ToModel(this ExtendedAttributeValue entity)
 {
     return(Mapper.Map <ExtendedAttributeValue, ExtendedAttributeValueModel>(entity));
 }