Пример #1
0
        public decimal GetBill()
        {
            decimal drinkBill = DrinkOrders.Sum(x => x.Price);
            decimal foodBill  = FoodOrders.Sum(x => x.Price);
            decimal totalBill = drinkBill + foodBill;

            return(totalBill);
        }
Пример #2
0
 public decimal GetBill()
 {
     return(FoodOrders.Sum(x => x.Price) + DrinkOrders.Sum(x => x.Price) + Price);
 }