Esempio n. 1
0
        public async Task <int> GetPizzaOrderCountBySurName(string surName)
        {
            var pizzaOrders = await context.PizzaOrders.Select(x => new { x.BaseType, Count = PizzaContext.PizzaOrderCountBySurName(surName) }).ToListAsync();

            if (pizzaOrders.Count == 0)
            {
                return(0);
            }
            else
            {
                return(pizzaOrders.First().Count);
            }
        }