Ejemplo n.º 1
0
        private void AddDrinkCounts()
        {
            var drinkGroups = Orders.GroupBy(order => order.DrinkType)
                              .OrderBy(order => order.Key.ToString());

            foreach (var drinkGroup in drinkGroups)
            {
                var drink = DrinkExtensions.ToFriendlyString(drinkGroup.Key);
                var count = drinkGroup.Count();
                _report.AppendLine($"{drink}: {count}");
            }
        }
 private decimal GetDrinkPrice()
 {
     return(DrinkExtensions.GetPrice(DrinkOrder));
 }