コード例 #1
0
        public virtual DynamicContentPlace ToModel(DynamicContentPlace place)
        {
            if (place == null)
            {
                throw new ArgumentNullException(nameof(place));
            }

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

            place.Name        = Name;
            place.FolderId    = FolderId;
            place.ImageUrl    = ImageUrl;
            place.Description = Description;

            if (Folder != null)
            {
                place.Folder = Folder.ToModel(AbstractTypeFactory <DynamicContentFolder> .TryCreateInstance());
            }

            return(place);
        }
コード例 #2
0
		public static dataModel.DynamicContentPlace ToDataModel(this coreModel.DynamicContentPlace contentPlace)
		{
			if (contentPlace == null)
				throw new ArgumentNullException("contentPlace");

			var retVal = new dataModel.DynamicContentPlace();
			retVal.InjectFrom(contentPlace);

			return retVal;
		}
コード例 #3
0
        /// <summary>
        /// Patch changes
        /// </summary>
        /// <param name="source"></param>
        /// <param name="target"></param>
        public static void Patch(this dataModel.DynamicContentPlace source, dataModel.DynamicContentPlace target)
        {
            if (target == null)
            {
                throw new ArgumentNullException("target");
            }

            var patchInjection = new PatchInjection <dataModel.DynamicContentPlace>(x => x.Name, x => x.Description, x => x.FolderId, x => x.ImageUrl);

            target.InjectFrom(patchInjection, source);
        }
コード例 #4
0
        public virtual DynamicContentPlace ToModel(DynamicContentPlace contentPlace)
        {
            if (contentPlace == null)
            {
                throw new ArgumentNullException(nameof(contentPlace));
            }

            ContentPlace.ToModel(contentPlace);

            return(contentPlace);
        }
コード例 #5
0
        public static dataModel.DynamicContentPlace ToDataModel(this coreModel.DynamicContentPlace contentPlace)
        {
            if (contentPlace == null)
            {
                throw new ArgumentNullException("contentPlace");
            }

            var retVal = new dataModel.DynamicContentPlace();

            retVal.InjectFrom(contentPlace);

            return(retVal);
        }
コード例 #6
0
        public virtual PublishingGroupContentPlaceEntity FromModel(DynamicContentPlace contentPlace, PrimaryKeyResolvingMap pkMap)
        {
            if (contentPlace == null)
            {
                throw new ArgumentNullException(nameof(contentPlace));
            }

            pkMap.AddPair(contentPlace, this);

            DynamicContentPlaceId = contentPlace.Id;

            return(this);
        }
コード例 #7
0
        /// <summary>
        /// Converting to model type
        /// </summary>
        /// <param name="catalogBase"></param>
        /// <returns></returns>
        public static coreModel.DynamicContentPlace ToCoreModel(this dataModel.DynamicContentPlace dbEntity)
        {
            if (dbEntity == null)
            {
                throw new ArgumentNullException("dbEntity");
            }

            var retVal = new coreModel.DynamicContentPlace();

            retVal.InjectFrom(dbEntity);

            if (dbEntity.Folder != null)
            {
                retVal.Folder = dbEntity.Folder.ToCoreModel();
            }

            return(retVal);
        }
コード例 #8
0
        public virtual DynamicContentPlaceEntity FromModel(DynamicContentPlace place, PrimaryKeyResolvingMap pkMap)
        {
            if (place == null)
            {
                throw new NullReferenceException(nameof(place));
            }

            pkMap.AddPair(place, this);

            this.Id           = place.Id;
            this.CreatedBy    = place.CreatedBy;
            this.CreatedDate  = place.CreatedDate;
            this.Description  = place.Description;
            this.ModifiedBy   = place.ModifiedBy;
            this.ModifiedDate = place.ModifiedDate;
            this.Name         = place.Name;
            this.FolderId     = place.FolderId;
            this.ImageUrl     = place.ImageUrl;

            return(this);
        }
コード例 #9
0
        public virtual DynamicContentPlaceEntity FromModel(DynamicContentPlace place, PrimaryKeyResolvingMap pkMap)
        {
            if (place == null)
            {
                throw new ArgumentNullException(nameof(place));
            }

            pkMap.AddPair(place, this);

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

            Name        = place.Name;
            FolderId    = place.FolderId;
            ImageUrl    = place.ImageUrl;
            Description = place.Description;

            return(this);
        }
コード例 #10
0
        public virtual DynamicContentPlace ToModel(DynamicContentPlace place)
        {
            if (place == null)
            {
                throw new NullReferenceException(nameof(place));
            }

            place.Id           = this.Id;
            place.CreatedBy    = this.CreatedBy;
            place.CreatedDate  = this.CreatedDate;
            place.Description  = this.Description;
            place.ModifiedBy   = this.ModifiedBy;
            place.ModifiedDate = this.ModifiedDate;
            place.Name         = this.Name;
            place.FolderId     = this.FolderId;
            place.ImageUrl     = this.ImageUrl;

            if (this.Folder != null)
            {
                place.Folder = this.Folder.ToModel(AbstractTypeFactory <DynamicContentFolder> .TryCreateInstance());
            }
            return(place);
        }