public static moduleModel.EditorialReview ToModuleModel(this webModel.EditorialReview review)
        {
            var retVal = new moduleModel.EditorialReview();

            retVal.InjectFrom(review);
            return(retVal);
        }
		/// <summary>
		/// Converting to model type
		/// </summary>
		/// <param name="catalogBase"></param>
		/// <returns></returns>
		public static coreModel.EditorialReview ToCoreModel(this dataModel.EditorialReview dbReview)
		{
			if (dbReview == null)
				throw new ArgumentNullException("dbReview");

			var retVal = new coreModel.EditorialReview();
			retVal.InjectFrom(dbReview);
			retVal.LanguageCode = dbReview.Locale;
			retVal.ReviewType = dbReview.Source;
			return retVal;

		}
Ejemplo n.º 3
0
        public static webModel.EditorialReview ToWebModel(this moduleModel.EditorialReview review)
        {
            var retVal = new webModel.EditorialReview();

            retVal.Content      = review.Content;
            retVal.Id           = review.Id;
            retVal.IsInherited  = review.IsInherited;
            retVal.LanguageCode = review.LanguageCode;
            retVal.ReviewType   = review.ReviewType;


            return(retVal);
        }
        /// <summary>
        /// Converting to model type
        /// </summary>
        /// <param name="catalogBase"></param>
        /// <returns></returns>
        public static coreModel.EditorialReview ToCoreModel(this dataModel.EditorialReview dbReview)
        {
            if (dbReview == null)
            {
                throw new ArgumentNullException("dbReview");
            }

            var retVal = new coreModel.EditorialReview();

            retVal.InjectFrom(dbReview);
            retVal.LanguageCode = dbReview.Locale;
            retVal.ReviewType   = dbReview.Source;
            return(retVal);
        }
Ejemplo n.º 5
0
        public object Clone()
        {
            var retVal = new EditorialReview();
            retVal.Id = Id;
            retVal.CreatedBy = CreatedBy;
            retVal.CreatedDate = CreatedDate;
            retVal.ModifiedBy = ModifiedBy;
            retVal.ModifiedDate = ModifiedDate;

            retVal.Content = Content;
            retVal.ReviewType = ReviewType;
            retVal.LanguageCode = LanguageCode;
            retVal.IsInherited = IsInherited;
            return retVal;
        }
Ejemplo n.º 6
0
        public object Clone()
        {
            var retVal = new EditorialReview();

            retVal.Id           = Id;
            retVal.CreatedBy    = CreatedBy;
            retVal.CreatedDate  = CreatedDate;
            retVal.ModifiedBy   = ModifiedBy;
            retVal.ModifiedDate = ModifiedDate;

            retVal.Content      = Content;
            retVal.ReviewType   = ReviewType;
            retVal.LanguageCode = LanguageCode;
            retVal.IsInherited  = IsInherited;
            return(retVal);
        }
Ejemplo n.º 7
0
		public CsvProduct()
		{
			SeoInfos = new List<SeoInfo>();
			Reviews = new List<EditorialReview>();
			PropertyValues = new List<PropertyValue>();
			Images = new List<Image>();
			Assets = new List<Asset>();


			Price = new Price() { Currency = CurrencyCodes.USD };
			Inventory = new InventoryInfo();
			EditorialReview = new EditorialReview();
			Reviews = new List<EditorialReview>();
			Reviews.Add(EditorialReview);
			SeoInfo = new SeoInfo();
			SeoInfos = new List<SeoInfo>();
			SeoInfos.Add(SeoInfo);
		}
Ejemplo n.º 8
0
		public CsvProduct()
		{
			SeoInfos = new List<SeoInfo>();
			Reviews = new List<EditorialReview>();
			PropertyValues = new List<PropertyValue>();
			Images = new List<Image>();
			Assets = new List<Asset>();


			Price = new Price() { Currency = "USD" };
			Inventory = new InventoryInfo();
			EditorialReview = new EditorialReview();
			Reviews = new List<EditorialReview>();
			Reviews.Add(EditorialReview);
			SeoInfo = new SeoInfo() { ObjectType = typeof(CatalogProduct).Name };
			SeoInfos = new List<SeoInfo>();
			SeoInfos.Add(SeoInfo);
		}
        /// <summary>
        /// Converting to foundation type
        /// </summary>
        /// <param name="itemAsset">The item asset.</param>
        /// <returns></returns>
        /// <exception cref="System.ArgumentNullException">itemAsset</exception>
        public static dataModel.EditorialReview ToDataModel(this coreModel.EditorialReview review, dataModel.Item product, PrimaryKeyResolvingMap pkMap)
        {
            if (review == null)
            {
                throw new ArgumentNullException("review");
            }

            var retVal = new dataModel.EditorialReview();

            pkMap.AddPair(review, retVal);
            retVal.InjectFrom(review);

            retVal.ItemId      = product.Id;
            retVal.Source      = review.ReviewType;
            retVal.ReviewState = (int)coreModel.ReviewState.Active;
            retVal.Locale      = review.LanguageCode;

            return(retVal);
        }
Ejemplo n.º 10
0
        /// <summary>
        /// Converting to model type
        /// </summary>
        /// <param name="catalogBase"></param>
        /// <returns></returns>
        public static coreModel.EditorialReview ToCoreModel(this dataModel.EditorialReview dbReview)
        {
            if (dbReview == null)
            {
                throw new ArgumentNullException("dbReview");
            }

            var retVal = new coreModel.EditorialReview();

            retVal.Content      = dbReview.Content;
            retVal.CreatedBy    = dbReview.CreatedBy;
            retVal.CreatedDate  = dbReview.CreatedDate;
            retVal.Id           = dbReview.Id;
            retVal.ModifiedBy   = dbReview.ModifiedBy;
            retVal.ModifiedDate = dbReview.ModifiedDate;
            retVal.LanguageCode = dbReview.Locale;
            retVal.ReviewType   = dbReview.Source;
            return(retVal);
        }
        /// <summary>
        /// Converting to foundation type
        /// </summary>
        /// <param name="itemAsset">The item asset.</param>
        /// <returns></returns>
        /// <exception cref="System.ArgumentNullException">itemAsset</exception>
        public static dataModel.EditorialReview ToDataModel(this coreModel.EditorialReview review, dataModel.Item product)
        {
            if (review == null)
            {
                throw new ArgumentNullException("review");
            }

            var retVal = new dataModel.EditorialReview();
            var id     = retVal.Id;

            retVal.InjectFrom(review);
            if (review.Id == null)
            {
                retVal.Id = id;
            }
            retVal.ItemId      = product.Id;
            retVal.Source      = review.ReviewType;
            retVal.ReviewState = (int)coreModel.ReviewState.Active;
            retVal.Locale      = review.LanguageCode;

            return(retVal);
        }
		public static moduleModel.EditorialReview ToModuleModel(this webModel.EditorialReview review)
		{
			var retVal = new moduleModel.EditorialReview();
			retVal.InjectFrom(review);
			return retVal;
		}