Exemple #1
0
        static void StoreView()
        {
            System.Console.Clear();
            System.Console.WriteLine("Which store would you like to check?");
            PrintAllStoresWithEF();
            Store store = _sql.SelectStore();

            store.Orders = _sql.ReadStoreOrders(store.StoreId).ToList <Order>();
            double total = 0;

            foreach (Order o in store.Orders)
            {
                //o.ComputePrice();
                System.Console.WriteLine(o.ToString());
                total = total + o.TotalPrice;
            }

            System.Console.WriteLine($"Total price of all orders: {total}");
            total = 0;
        }