protected virtual ISellableInventoryItemEntryMvoStateCreated Map(ICreateSellableInventoryItemEntryMvo c) { var stateEventId = new SellableInventoryItemEntryMvoEventId(c.SellableInventoryItemEntryId, c.SellableInventoryItemVersion); ISellableInventoryItemEntryMvoStateCreated e = NewSellableInventoryItemEntryMvoStateCreated(stateEventId); e.SellableQuantity = c.SellableQuantity; e.SourceEventId = c.SourceEventId; e.Version = c.Version; e.SellableInventoryItemSellableQuantity = c.SellableInventoryItemSellableQuantity; e.SellableInventoryItemCreatedBy = c.SellableInventoryItemCreatedBy; e.SellableInventoryItemCreatedAt = c.SellableInventoryItemCreatedAt; e.SellableInventoryItemUpdatedBy = c.SellableInventoryItemUpdatedBy; e.SellableInventoryItemUpdatedAt = c.SellableInventoryItemUpdatedAt; e.CommandId = c.CommandId; e.CreatedBy = (string)c.RequesterId; e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>(); var sellableInventoryItemVersion = c.SellableInventoryItemVersion; return(e); }
public virtual void When(ICreateSellableInventoryItemEntryMvo c) { Update(c, ar => ar.Create(c)); }
void ISellableInventoryItemEntryMvoApplicationService.When(ICreateSellableInventoryItemEntryMvo c) { this.When((CreateSellableInventoryItemEntryMvoDto)c); }
public virtual void Create(ICreateSellableInventoryItemEntryMvo c) { ISellableInventoryItemEntryMvoStateCreated e = Map(c); Apply(e); }