project0/Business/Business.cs
/// <summary>
/// Find an order by Id and
/// Collect extended information on it
/// </summary>
Find an order by Id and
Collect extended information on it
Find an order by Id and Collect extended information on it
public String findOrderById(int orderId)
    {
      var myOrder = ((DbSet<Order>)Orders).Where(o => o.Id == orderId)
      .Include(o => o.OrderItems).ThenInclude(io => io.Item)
      .Include(o => o.Customer).Include(o => o.Location).First();
      string output = "";
      output += $"Customer: {myOrder.Customer}\n";
      output += $"Location: {myOrder.Location}\n";
      output += myOrder.ToString();
      return output;
    }
public String findOrderById ( int orderId ) { var myOrder = ( ( DbSet < Order > ) Orders ) . Where ( o => o . Id == orderId ) . Include ( o => o . OrderItems ) . ThenInclude ( io => io . Item ) . Include ( o => o . Customer ) . Include ( o => o . Location ) . First ( ) ; string output = " " ; output += $" Customer:  { myOrder . Customer } \n " ; output += $" Location:  { myOrder . Location } \n " ; output += myOrder . ToString ( ) ; return output ; }
Find an order by Id and
Collect extended information on it
Find an order by Id and Collect extended information on it
orderId
int