score:3

Accepted answer

if you order does not refer back to a customer, the trick is to first create a dataset which keeps the customers and orders linked together:

customers
   .selectmany(c => c.orders.select(o => new {
       cust = c,
       ord = o
   }))

then on this customerorder (co) you can apply your join:

...
    .join(products, 
        co => co.ord.productid, 
        prod => prod.productid, 
        (co,prod) => new {
          co.cust.name,
          co.ord.productid, 
          orderamount = ord.quantity * prod.price});

Related Query

More Query from same tag