title: Entity Framework Distinct records from multiple tables
body: <p>I am trying to get distinct values by joining multiple tables. Can someone please tell me how to do the same in the below code?</p>
  
  <p>Please see the sample code below:</p>
  
  <pre><code>var distinctValues = (from a in dataContext.A_Table
                        join b in dataContext.B_Table on a.EmpID equals b.EmpID
                        join c in dataContext.C_Table on b.SomeID equals c.ID
                        where a.IsActive == true
                              &amp;&amp; a.ID == id
                        select new NewClass()
                                   {
                                      ID = c.ID,
                                      Name = c.Name
                                   }).ToList();
  </code></pre>