Ejemplo n.º 1
0
        public SizingStandardDTO(SizingStandard entity)
        {
            Id    = entity.Id;
            Title = entity.Title;

            Initiliazing(entity);
        }
Ejemplo n.º 2
0
        partial void Converting(SizingStandard entity)
        {
            var sizings = Sizings.OrderBy(c => c.DisplayOrder);

            foreach (var item in sizings)
            {
                entity.Sizings.Add(item.ToSizing());
            }
        }
Ejemplo n.º 3
0
        protected virtual void Constructing(SizingStandard entity)
        {
            var sizings = entity.Sizings.OrderBy(c => c.DisplayOrder);

            foreach (var item in entity.Sizings)
            {
                Sizings.Add(new SizingDTO(item));
            }
        }
Ejemplo n.º 4
0
        public virtual SizingStandard ToSizingStandard()
        {
            var entity = new SizingStandard();

            entity.Id    = Id;
            entity.Title = Title;

            Converting(entity);

            return(entity);
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Clones all properties in a new SizingStandard instance,
        /// except PrimaryKey(s)
        /// </summary>
        /// <returns>New SizingStandard instance</returns>
        public SizingStandard Clone()
        {
            var clone = new SizingStandard();

            clone.Title      = Title;
            clone.ModifyNr   = ModifyNr;
            clone.ModifyDate = ModifyDate;
            clone.ModifierId = ModifierId;
            clone.ModifierIp = ModifierIp;
            clone.CreateDate = CreateDate;
            clone.CreatorId  = CreatorId;
            clone.CreatorIp  = CreatorIp;

            Cloning(clone);

            return(clone);
        }
Ejemplo n.º 6
0
 // Use below function in a partial class file (eg. SizingStandard.part.cs)
 // to add more complexity to clone
 partial void Cloning(SizingStandard clone);
Ejemplo n.º 7
0
 partial void Converting(SizingStandard entity);
Ejemplo n.º 8
0
 partial void Initiliazing(SizingStandard entity);
Ejemplo n.º 9
0
 partial void Initiliazing(SizingStandard entity)
 {
     Constructing(entity);
 }