예제 #1
0
        public static decimal GetDayMealTotalCarbs(DateTime date)
        {
            decimal total = 0;

            foreach (DayMeal dayMeal in GetDayMealsList(date))
            {
                Food food = GetFood(dayMeal.FoodId);
                total = total + food.CarbsInGrams(dayMeal.Grams);
            }

            return(total);
        }