Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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