public SizingDTO(Sizing entity) { Id = entity.Id; DisplayOrder = entity.DisplayOrder; Caption = entity.Caption; SizingStandardId = entity.SizingStandardId; Initiliazing(entity); }
public virtual Sizing ToSizing() { var entity = new Sizing(); entity.Id = Id; entity.DisplayOrder = DisplayOrder; entity.Caption = Caption; entity.SizingStandardId = SizingStandardId; Converting(entity); return(entity); }
/// <summary> /// Clones all properties in a new Sizing instance, /// except PrimaryKey(s) /// </summary> /// <returns>New Sizing instance</returns> public Sizing Clone() { var clone = new Sizing(); clone.DisplayOrder = DisplayOrder; clone.Caption = Caption; clone.SizingStandardId = SizingStandardId; 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); }
// Use below function in a partial class file (eg. Sizing.part.cs) // to add more complexity to clone partial void Cloning(Sizing clone);
partial void Converting(Sizing entity);
partial void Initiliazing(Sizing entity);