protected virtual ISupplierProductStateCreated Map(ICreateSupplierProduct c) { var stateEventId = new SupplierProductEventId(c.SupplierProductId, c.Version); ISupplierProductStateCreated e = NewSupplierProductStateCreated(stateEventId); e.AvailableThruDate = c.AvailableThruDate; e.SupplierPrefOrderId = c.SupplierPrefOrderId; e.SupplierRatingTypeId = c.SupplierRatingTypeId; e.StandardLeadTimeDays = c.StandardLeadTimeDays; e.ManufacturingLeadTimeDays = c.ManufacturingLeadTimeDays; e.DeliveryLeadTimeDays = c.DeliveryLeadTimeDays; e.QuantityUomId = c.QuantityUomId; e.LastPrice = c.LastPrice; e.ShippingPrice = c.ShippingPrice; e.ExternalProductName = c.ExternalProductName; e.ExternalProductId = c.ExternalProductId; e.CanDropShip = c.CanDropShip; e.Comments = c.Comments; e.Active = c.Active; e.CommandId = c.CommandId; e.CreatedBy = (string)c.RequesterId; e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>(); var version = c.Version; return(e); }
protected SupplierProductStateMergePatched NewSupplierProductStateMergePatched(long version, string commandId, string requesterId) { var stateEventId = new SupplierProductEventId(_state.SupplierProductId, version); var e = NewSupplierProductStateMergePatched(stateEventId); e.CommandId = commandId; e.CreatedBy = (string)requesterId; e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>(); return(e); }
public override bool Equals(object obj) { if (Object.ReferenceEquals(this, obj)) { return(true); } SupplierProductEventId other = obj as SupplierProductEventId; if (other == null) { return(false); } return(true && Object.Equals(this.SupplierProductId, other.SupplierProductId) && Object.Equals(this.Version, other.Version) ); }
protected SupplierProductEventBase(SupplierProductEventId stateEventId) { this.SupplierProductEventId = stateEventId; }
public SupplierProductStateMergePatched(SupplierProductEventId stateEventId) : base(stateEventId) { }
public SupplierProductStateCreated(SupplierProductEventId stateEventId) : base(stateEventId) { }
protected SupplierProductStateEventBase(SupplierProductEventId stateEventId) : base(stateEventId) { }
private SupplierProductStateMergePatched NewSupplierProductStateMergePatched(SupplierProductEventId stateEventId) { return(new SupplierProductStateMergePatched(stateEventId)); }
//////////////////////// private SupplierProductStateCreated NewSupplierProductStateCreated(SupplierProductEventId stateEventId) { return(new SupplierProductStateCreated(stateEventId)); }