title: LINQ multiple Joins with a Group By
body: <p>After trying a lot I decided to post a question here. My code is the following:</p>
  
  <pre><code>var query =
              //Customers
              from customer in context.Customers
  
              //Engineer 1
              join engineer1 in context.Employees on customer.PrimaryEngineer equals
              engineer1.EmployeeId into eng1 
              from engineer1 in eng1.DefaultIfEmpty()
  
              //Engineer Top
              join engineerTop in context.Employees on customer.TopEngineer equals 
              topEngineer.EmployeeId into top
              from engineerTop in top.DefaultIfEmpty()
  </code></pre>
  
  <p>Then, what I want i group by attributes from the three tables : Customer, Employees (this one repeats for every engineer)</p>
  
  <p>How can I group by attributes from the three tables?</p>
  
  <p>The next code: </p>
  
  <pre><code>            group new {customer, engineer1, engineerTop} by new {customer.Name .....}
  </code></pre>
  
  <p>doesn't work due to engineer1 and engineerTop are from the same context?</p>
  
  <p>I'm very confused with this. </p>
  
  <p>Thanks all for your help</p>