Esempio n. 1
0
        public float GetSumOfAllCoffeesPrice()
        {
            var allCoffeesFromList = coffeeService.GetCoffees();

            float sumOfAllPrices = allCoffeesFromList.Sum(coffees => coffees.Price);

            return(sumOfAllPrices);
        }
Esempio n. 2
0
        public ActionResult <IEnumerable <CoffeeDto> > Get(CancellationToken tk)
        {
            var liste = _CoffeeService.GetCoffees(tk);

            return(Ok(liste));
        }
        public float GetSumOfAllCoffees()
        {
            var coffees = coffeeService.GetCoffees();

            return(coffees.Sum(i => i.Price));
        }