예제 #1
0
 private static InventoryItemStockView Map(InventoryItemStockLimitChanged e, InventoryItemStockView v)
 {
     return(new InventoryItemStockView
     {
         IsActive = v.IsActive,
         Sku = v.Sku,
         Count = v.Count,
         OverStockLimit = e.Limit
     });
 }
예제 #2
0
 private static InventoryItemStockView Map(ItemsCheckedInToInventory e, InventoryItemStockView v)
 {
     return(new InventoryItemStockView
     {
         IsActive = v.IsActive,
         Sku = v.Sku,
         Count = v.Count + e.Count,
         OverStockLimit = v.OverStockLimit
     });
 }
예제 #3
0
 private static InventoryItemStockView Map(ItemsRemovedFromInventory e, InventoryItemStockView v)
 {
     return(new InventoryItemStockView
     {
         IsActive = v.IsActive,
         Sku = v.Sku,
         Count = v.Count - e.Count,
         OverStockLimit = v.OverStockLimit
     });
 }
예제 #4
0
 private static InventoryItemStockView Map(InventoryItemCreated e, InventoryItemStockView v)
 {
     return(new InventoryItemStockView
     {
         IsActive = v.IsActive ?? true,
         Sku = e.Id,
         Count = v.Count,
         OverStockLimit = v.OverStockLimit
     });
 }
예제 #5
0
 private static InventoryItemStockView Map(InventoryItemDeactivated e, InventoryItemStockView v)
 {
     return(new InventoryItemStockView
     {
         IsActive = false,
         Sku = v.Sku,
         Count = v.Count,
         OverStockLimit = v.OverStockLimit
     });
 }
예제 #6
0
 private static void Handle(InventoryItemStockView view, InventoryItemCreated notification, AdoNetTransactionUowProvider <TConnectionStringName> uowProvider)
 {
     uowProvider.Value.Connection.Update(Map(notification, view), uowProvider.Value);
 }