protected virtual IShipmentPackageContentMvoStateMergePatched Map(IMergePatchShipmentPackageContentMvo c)
        {
            var stateEventId = new ShipmentPackageContentMvoEventId(c.ShipmentPackageContentId, c.ShipmentPackageVersion);
            IShipmentPackageContentMvoStateMergePatched e = NewShipmentPackageContentMvoStateMergePatched(stateEventId);

            e.Quantity           = c.Quantity;
            e.SubProductId       = c.SubProductId;
            e.SubProductQuantity = c.SubProductQuantity;
            e.Version            = c.Version;
            e.Active             = c.Active;
            e.ShipmentPackageShipmentBoxTypeId    = c.ShipmentPackageShipmentBoxTypeId;
            e.ShipmentPackageDateCreated          = c.ShipmentPackageDateCreated;
            e.ShipmentPackageBoxLength            = c.ShipmentPackageBoxLength;
            e.ShipmentPackageBoxHeight            = c.ShipmentPackageBoxHeight;
            e.ShipmentPackageBoxWidth             = c.ShipmentPackageBoxWidth;
            e.ShipmentPackageDimensionUomId       = c.ShipmentPackageDimensionUomId;
            e.ShipmentPackageWeight               = c.ShipmentPackageWeight;
            e.ShipmentPackageWeightUomId          = c.ShipmentPackageWeightUomId;
            e.ShipmentPackageInsuredValue         = c.ShipmentPackageInsuredValue;
            e.ShipmentPackageCreatedBy            = c.ShipmentPackageCreatedBy;
            e.ShipmentPackageCreatedAt            = c.ShipmentPackageCreatedAt;
            e.ShipmentPackageUpdatedBy            = c.ShipmentPackageUpdatedBy;
            e.ShipmentPackageUpdatedAt            = c.ShipmentPackageUpdatedAt;
            e.ShipmentPackageActive               = c.ShipmentPackageActive;
            e.ShipmentPackageDeleted              = c.ShipmentPackageDeleted;
            e.IsPropertyQuantityRemoved           = c.IsPropertyQuantityRemoved;
            e.IsPropertySubProductIdRemoved       = c.IsPropertySubProductIdRemoved;
            e.IsPropertySubProductQuantityRemoved = c.IsPropertySubProductQuantityRemoved;
            e.IsPropertyVersionRemoved            = c.IsPropertyVersionRemoved;
            e.IsPropertyActiveRemoved             = c.IsPropertyActiveRemoved;
            e.IsPropertyShipmentPackageShipmentBoxTypeIdRemoved = c.IsPropertyShipmentPackageShipmentBoxTypeIdRemoved;
            e.IsPropertyShipmentPackageDateCreatedRemoved       = c.IsPropertyShipmentPackageDateCreatedRemoved;
            e.IsPropertyShipmentPackageBoxLengthRemoved         = c.IsPropertyShipmentPackageBoxLengthRemoved;
            e.IsPropertyShipmentPackageBoxHeightRemoved         = c.IsPropertyShipmentPackageBoxHeightRemoved;
            e.IsPropertyShipmentPackageBoxWidthRemoved          = c.IsPropertyShipmentPackageBoxWidthRemoved;
            e.IsPropertyShipmentPackageDimensionUomIdRemoved    = c.IsPropertyShipmentPackageDimensionUomIdRemoved;
            e.IsPropertyShipmentPackageWeightRemoved            = c.IsPropertyShipmentPackageWeightRemoved;
            e.IsPropertyShipmentPackageWeightUomIdRemoved       = c.IsPropertyShipmentPackageWeightUomIdRemoved;
            e.IsPropertyShipmentPackageInsuredValueRemoved      = c.IsPropertyShipmentPackageInsuredValueRemoved;
            e.IsPropertyShipmentPackageCreatedByRemoved         = c.IsPropertyShipmentPackageCreatedByRemoved;
            e.IsPropertyShipmentPackageCreatedAtRemoved         = c.IsPropertyShipmentPackageCreatedAtRemoved;
            e.IsPropertyShipmentPackageUpdatedByRemoved         = c.IsPropertyShipmentPackageUpdatedByRemoved;
            e.IsPropertyShipmentPackageUpdatedAtRemoved         = c.IsPropertyShipmentPackageUpdatedAtRemoved;
            e.IsPropertyShipmentPackageActiveRemoved            = c.IsPropertyShipmentPackageActiveRemoved;
            e.IsPropertyShipmentPackageDeletedRemoved           = c.IsPropertyShipmentPackageDeletedRemoved;

            e.CommandId = c.CommandId;


            e.CreatedBy = (string)c.RequesterId;
            e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>();

            var shipmentPackageVersion = c.ShipmentPackageVersion;


            return(e);
        }
Пример #2
0
 void IShipmentPackageContentMvoApplicationService.When(IMergePatchShipmentPackageContentMvo c)
 {
     this.When((MergePatchShipmentPackageContentMvoDto)c);
 }
 public virtual void When(IMergePatchShipmentPackageContentMvo c)
 {
     Update(c, ar => ar.MergePatch(c));
 }
        public virtual void MergePatch(IMergePatchShipmentPackageContentMvo c)
        {
            IShipmentPackageContentMvoStateMergePatched e = Map(c);

            Apply(e);
        }