Beispiel #1
0
        private static WarehouseInventory CreateWarehouseInventory(IEnumerable<Product> products)
        {
            var inventory = new WarehouseInventory();

            // start with an inventory of twice the reorder level of each product
            foreach(var product in products){
                inventory.Add(product, product.ReorderCount * 2);
            }
            return inventory;
        }