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); }
public virtual void When(ICreateSupplierProduct c) { Update(c, ar => ar.Create(c)); }
void ISupplierProductApplicationService.When(ICreateSupplierProduct c) { this.When((CreateSupplierProductDto)c); }
public virtual void Create(ICreateSupplierProduct c) { ISupplierProductStateCreated e = Map(c); Apply(e); }