/// <summary>
        /// Converting to foundation type
        /// </summary>
        /// <param name="catalog"></param>
        /// <returns></returns>
        public static dataModel.PropertyAttribute ToDataModel(this coreModel.PropertyAttribute attribute)
        {
            var retVal = new dataModel.PropertyAttribute();

            retVal.InjectFrom(attribute);

            retVal.PropertyAttributeName  = attribute.Name;
            retVal.PropertyAttributeValue = attribute.Value;
            return(retVal);
        }
		/// <summary>
		/// Converting to foundation type
		/// </summary>
		/// <param name="catalog"></param>
		/// <returns></returns>
		public static dataModel.PropertyAttribute ToDataModel(this coreModel.PropertyAttribute attribute)
		{
			var retVal = new dataModel.PropertyAttribute();
	
			retVal.InjectFrom(attribute);
	
			retVal.PropertyAttributeName = attribute.Name;
			retVal.PropertyAttributeValue = attribute.Value;
			return retVal;
		}
        /// <summary>
        /// Patch CatalogLanguage type
        /// </summary>
        /// <param name="source"></param>
        /// <param name="target"></param>
        public static void Patch(this dataModel.PropertyAttribute source, dataModel.PropertyAttribute target)
        {
            if (target == null)
            {
                throw new ArgumentNullException("target");
            }

            var patchInjectionPolicy = new PatchInjection <dataModel.PropertyAttribute>(x => x.PropertyAttributeName, x => x.PropertyAttributeValue);

            target.InjectFrom(patchInjectionPolicy, source);
        }
		/// <summary>
		/// Converting to foundation type
		/// </summary>
		/// <param name="catalog"></param>
		/// <returns></returns>
		public static dataModel.PropertyAttribute ToDataModel(this coreModel.PropertyAttribute attribute)
		{
			var retVal = new dataModel.PropertyAttribute();
			var id = retVal.Id;
			retVal.InjectFrom(attribute);
			if(attribute.Id == null)
			{
				retVal.Id = id;
			}

			retVal.PropertyAttributeName = attribute.Name;
			retVal.PropertyAttributeValue = attribute.Value;
			return retVal;
		}
        /// <summary>
        /// Converting to foundation type
        /// </summary>
        /// <param name="catalog"></param>
        /// <returns></returns>
        public static dataModel.PropertyAttribute ToDataModel(this coreModel.PropertyAttribute attribute)
        {
            var retVal = new dataModel.PropertyAttribute();
            var id     = retVal.Id;

            retVal.InjectFrom(attribute);
            if (attribute.Id == null)
            {
                retVal.Id = id;
            }

            retVal.PropertyAttributeName  = attribute.Name;
            retVal.PropertyAttributeValue = attribute.Value;
            return(retVal);
        }