Exemplo n.º 1
0
        static void Main(string[] args)
        {
            try
            {
                InitializeDepedencyInjections();

                ConsoleMessage.DisplayStartMessage();



                IPizzaToppingData APizzaToppingData = new PizzaToppingDataJson(_AppHostSingleton);

                var AToppingAggregateMgr = new ToppingAggregateMgr(APizzaToppingData);

                List <IToppingAggregate> TopPizzaCombinations = AToppingAggregateMgr.GetTopPizzaCombinations(_TopPizzaMaxRows);

                var PizzaDisplayText = TopPizzaCombinations
                                       .Select(aItem => $"The toppings {aItem.ToppingName} was ordered {aItem.NumberTimesOrdered} times.");

                ConsoleMessage.DisplayMessage(PizzaDisplayText);

                ConsoleMessage.DisplayEndMessage();
            }
            catch (Exception e) {
                ConsoleMessage.ErrorMessage("The Pizza Aggregate failed.");
            }
        }