public void GetOrder() { Item OrderItem = new Item(); Customer c = new Customer(); Location l = new Location(); foreach (var item in _storeBL.GetOrder()) { if (item.CFK == currentCustomer.Id) { Console.WriteLine((_storeBL.GetCustomerById((int)item.CFK).ToString())); l = _storeBL.GetLocationById((int)item.LFK); Console.WriteLine(l.ToString() + "\n"); OrderItem = _storeBL.GetItemByOID((int)item.Id); // if(OrderItem.Id ==null || OrderItem.PFK==null) // { // Console.WriteLine((_storeBL.GetProductById(OrderItem.PFK)).ToString()); // Console.WriteLine($"Quantity {OrderItem.Quantity}"); // } Console.WriteLine(item.ToString()); //_storeBL.GetOIS } } Console.WriteLine("Press any key to continue"); Console.ReadLine(); }