Created
November 12, 2013 17:45
-
-
Save JamesBender/7435347 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private Dictionary<Guid, int> CheckInventoryLevels(ShoppingCart shoppingCart, Guid orderFulfillmentSessionId) | |
{ | |
var orderForFulfillmentService = new Dictionary<Guid, int>(); | |
foreach (var shoppingCartItem in shoppingCart.Items) | |
{ | |
var itemId = shoppingCartItem.ItemId; | |
var itemQuantity = shoppingCartItem.Quantity; | |
var itemIsInInventory = _orderFulfillmentService.IsInInventory(orderFulfillmentSessionId, itemId, itemQuantity); | |
orderForFulfillmentService.Add(itemId, itemQuantity); | |
} | |
return orderForFulfillmentService; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment