public POAttachmentDTO(POAttachment entity) { Id = entity.Id; PurchaseOrderId = entity.PurchaseOrderId; FileUrl = entity.FileUrl; FileTitle = entity.FileTitle; FileName = entity.FileName; FileType = entity.FileType; DisplayOrder = entity.DisplayOrder; Initiliazing(entity); }
public virtual POAttachment ToPOAttachment() { var entity = new POAttachment(); entity.Id = Id; entity.PurchaseOrderId = PurchaseOrderId; entity.FileUrl = FileUrl; entity.FileTitle = FileTitle; entity.FileName = FileName; entity.FileType = FileType; entity.DisplayOrder = DisplayOrder; Converting(entity); return(entity); }
/// <summary> /// Clones all properties in a new POAttachment instance, /// except PrimaryKey(s) /// </summary> /// <returns>New POAttachment instance</returns> public POAttachment Clone() { var clone = new POAttachment(); clone.PurchaseOrderId = PurchaseOrderId; clone.FileUrl = FileUrl; clone.FileTitle = FileTitle; clone.FileName = FileName; clone.FileType = FileType; clone.DisplayOrder = DisplayOrder; 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. POAttachment.part.cs) // to add more complexity to clone partial void Cloning(POAttachment clone);
partial void Converting(POAttachment entity);
partial void Initiliazing(POAttachment entity);