/// <summary> /// Clones all properties in a new POShipment instance, /// except PrimaryKey(s) /// </summary> /// <returns>New POShipment instance</returns> public POShipment Clone() { var clone = new POShipment(); clone.ShippingNr = ShippingNr; clone.ShippingDate = ShippingDate; clone.DeliveryNr = DeliveryNr; clone.DeliveryDate = DeliveryDate; clone.DestinationNr = DestinationNr; clone.RefCode = RefCode; clone.CustomerRefNr = CustomerRefNr; clone.Quantity = Quantity; clone.IsShipped = IsShipped; clone.IsDelivered = IsDelivered; clone.PurchaseOrderId = PurchaseOrderId; clone.FreightTermId = FreightTermId; 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); }
public POShipmentDTO(POShipment entity) { Id = entity.Id; ShippingNr = entity.ShippingNr; ShippingDate = entity.ShippingDate; DeliveryNr = entity.DeliveryNr; DeliveryDate = entity.DeliveryDate; DestinationNr = entity.DestinationNr; RefCode = entity.RefCode; CustomerRefNr = entity.CustomerRefNr; Quantity = entity.Quantity; IsShipped = entity.IsShipped; IsDelivered = entity.IsDelivered; PurchaseOrderId = entity.PurchaseOrderId; FreightTermId = entity.FreightTermId; Initiliazing(entity); }
public virtual POShipment ToPOShipment() { var entity = new POShipment(); entity.Id = Id; entity.ShippingNr = ShippingNr; entity.ShippingDate = ShippingDate; entity.DeliveryNr = DeliveryNr; entity.DeliveryDate = DeliveryDate; entity.DestinationNr = DestinationNr; entity.RefCode = RefCode; entity.CustomerRefNr = CustomerRefNr; entity.Quantity = Quantity; entity.IsShipped = IsShipped; entity.IsDelivered = IsDelivered; entity.PurchaseOrderId = PurchaseOrderId; entity.FreightTermId = FreightTermId; Converting(entity); return(entity); }
partial void Converting(POShipment entity);
partial void Initiliazing(POShipment entity);
// Use below function in a partial class file (eg. POShipment.part.cs) // to add more complexity to clone partial void Cloning(POShipment clone);