protected virtual IInventoryItemEntryMvoStateCreated Map(ICreateInventoryItemEntryMvo c) { var stateEventId = new InventoryItemEntryMvoEventId(c.InventoryItemEntryId, c.InventoryItemVersion); IInventoryItemEntryMvoStateCreated e = NewInventoryItemEntryMvoStateCreated(stateEventId); e.OnHandQuantity = c.OnHandQuantity; e.InTransitQuantity = c.InTransitQuantity; e.ReservedQuantity = c.ReservedQuantity; e.OccupiedQuantity = c.OccupiedQuantity; e.VirtualQuantity = c.VirtualQuantity; e.Source = c.Source; e.Version = c.Version; e.InventoryItemOnHandQuantity = c.InventoryItemOnHandQuantity; e.InventoryItemInTransitQuantity = c.InventoryItemInTransitQuantity; e.InventoryItemReservedQuantity = c.InventoryItemReservedQuantity; e.InventoryItemOccupiedQuantity = c.InventoryItemOccupiedQuantity; e.InventoryItemVirtualQuantity = c.InventoryItemVirtualQuantity; e.InventoryItemCreatedBy = c.InventoryItemCreatedBy; e.InventoryItemCreatedAt = c.InventoryItemCreatedAt; e.InventoryItemUpdatedBy = c.InventoryItemUpdatedBy; e.InventoryItemUpdatedAt = c.InventoryItemUpdatedAt; e.CommandId = c.CommandId; e.CreatedBy = (string)c.RequesterId; e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>(); var inventoryItemVersion = c.InventoryItemVersion; return(e); }
public virtual void When(ICreateInventoryItemEntryMvo c) { Update(c, ar => ar.Create(c)); }
public virtual void Create(ICreateInventoryItemEntryMvo c) { IInventoryItemEntryMvoStateCreated e = Map(c); Apply(e); }
void IInventoryItemEntryMvoApplicationService.When(ICreateInventoryItemEntryMvo c) { this.When((CreateInventoryItemEntryMvoDto)c); }