title: How to join multiple tables to one table with lambda expression?
body: <p>I have 3 Table and Model like below</p>
  
  <p>Table 1: Student</p>
  
  <pre><code>+----+-------+---------+
  | ID | Name  | Subject |
  +----+-------+---------+
  | 1  | Alex  | 2       |
  +----+-------+---------+
  | 2  | Peter | 1       |
  +----+-------+---------+
  | 3  | Thomas| null    |
  +----+-------+---------+
  
  public class Student {
  
      public int ID {get; set;}
      public string Name {get; set;}
      public int Subject {get; set;}
  }
  </code></pre>
  
  <p>Table 2: Subject</p>
  
  <pre><code>+----+---------+---------+
  | ID | Subject | Teacher |
  +----+---------+---------+
  | 1  | Math    | 5       |
  +----+---------+---------+
  | 2  | History | 6       |
  +----+---------+---------+
  
  public class Subject {
  
      public int ID {get; set;}
      public string Subject {get; set;}
      public int Teacher {get; set;}
  }
  </code></pre>
  
  <p>Table 3: Teacher</p>
  
  <pre><code>+----+---------+---------------+
  | ID | TeacherName | Email     |
  +----+-------------+-----------+
  | 6  | John        | null      |
  +----+-------------+-----------+
  | 2  | Anna        | anna@aa.c |
  +----+-------------+-----------+
  
  public class Teacher {
  
      public int ID {get; set;}
      public string TeacherName {get; set;}
      public string Email {get; set;}
  }
  </code></pre>
  
  <p>I create a new model like this</p>
  
  <pre><code>public class newModel{
  
      public Student studentList;
      public Teacher teacherList;
      public Subject subjectList;
  }
  </code></pre>
  
  <p>How can I merge 3 table (model) above to a new table (model) with lambda expression?</p>
  
  <p>It's mean I want join Table 1 to Table 2 by <code>SubjectID</code>.
  Then, new Table created by Table 1 and Table 2 join with Table 3 by Teacher ID. But keep every Things in Table 1 in new.</p>
  
  <p>It's look like </p>
  
  <pre><code>List&lt;newModel&gt; finalList = new List&lt;newModel&gt;();
  finalList = db.Student.Join( .... )
  </code></pre>
  
  <p>and the final result of <code>finalList</code> like below:</p>
  
  <pre><code>+----+--------+---------+-------------+-----------+-------------+-------+
  | ID | Name   | Subject | SubjectName | TeacherID | Teachername | Email |
  +----+--------+---------+-------------+-----------+-------------+-------+
  | 1  | Alex   | 2       | History     | 6         | John        | null  |
  +----+--------+---------+-------------+-----------+-------------+-------+
  | 2  | Perter | 1       | Math        |           |             |       |
  +----+--------+---------+-------------+-----------+-------------+-------+
  | 3  | Thomas | null    |             |           |             |       |
  +----+--------+---------+-------------+-----------+-------------+-------+
  </code></pre>