public void SetPizzaOrders() { var ef = new EfData(); AllPizzaOrders = new List <PizzaOrder>(); List <int> orderIDs = ef.GetOrderIdsForCustomer(CustomerID); foreach (int orderID in orderIDs) { PizzaOrder po = new PizzaOrder(); po.OrderID = orderID; Console.WriteLine("Found previous order: {0}", orderID); Order order = ef.GetOrderById(orderID); po.CustomerName = ef.GetCustomerNameByID(CustomerID); po.OrderValue = order.TotalValue.Value; po.OrderTime = order.OrderTime; po.LocationString = ef.GetLocationByID(ef.GetLocationIDForOrder(orderID)); po.PizzaStrings = GetAllPizzasInOrder(ef.GetPizza2sForOrder(orderID)); AllPizzaOrders.Add(po); } Console.WriteLine("There are {0} total orders.", AllPizzaOrders.Count); }