title: How to join 3 tables with lambda expression?
body: <p>I have a simple LINQ lambda join query but I want to add a 3rd join with a where clause.  How do I go about doing that?</p>
  
  <p>Here's my single join query:</p>
  
  <pre><code>var myList = Companies
      .Join(
          Sectors,
          comp =&gt; comp.Sector_code,
          sect =&gt; sect.Sector_code,
          (comp, sect) =&gt; new {Company = comp, Sector = sect} )
      .Select( c =&gt; new {
          c.Company.Equity_cusip,
          c.Company.Company_name,
          c.Company.Primary_exchange,
          c.Company.Sector_code,
          c.Sector.Description
      });
  </code></pre>
  
  <p>I want to add the following SQL command to the above LINQ query and still maintain the projections:</p>
  
  <pre><code>SELECT
      sector_code, industry_code 
  FROM
      distribution_sector_industry 
  WHERE
      service = 'numerical'
  </code></pre>
  
  <p>The 3rd join would be made with Sector table &amp; Distribution_sector_industry on sector_code.</p>
  
  <p>Thanks in advance.</p>