public float GetSumOfAllCoffeesPrice() { var allCoffeesFromList = coffeeService.GetCoffees(); float sumOfAllPrices = allCoffeesFromList.Sum(coffees => coffees.Price); return(sumOfAllPrices); }
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)); }