title: Write the equivalent SQL Select statement with 2 Left Join in LINQ
body: <p>I need to convert the following SQL select statement below to its LINQ equivalent.</p>
  <p><strong>SQL STATEMENT:</strong></p>
  <pre class="lang-sql prettyprint-override"><code>SELECT MainTitles.Title,
      SubTitles.Title,
      ContentResources.ResourceContent,
      SubTitles.MainTitleId,
      SubTitles.SubTitleId
  FROM ContentResources
  LEFT JOIN MainTitles on ContentResources.MainTitleId = MainTitles.MainTitleId
  LEFT JOIN SubTitles on ContentResources.ContentResourceId = SubTitles.ContentResourceId
  </code></pre>
  <p><strong>TABLE SAMPLES:</strong></p>
  <p>Table Structure with Sample Data</p>
  <p><a href="https://i.stack.imgur.com/yufJz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yufJz.png" alt="" /></a></p>
  <p><strong>RESULT OF THE STATEMENT:</strong></p>
  <p>The desired result using SQL is shown in the screenshot below.</p>
  <p>[<img src="https://i.stack.imgur.com/vGPmW.png" alt="The Query Result of the SQL Statement Above" /></p>
  <p><strong>WHAT I HAVE TRIED IN LINQ</strong></p>
  <pre class="lang-cs prettyprint-override"><code>var resources = (from c in _context.ContentResources
                   join m in _context.MainTitles
                   on c.MainTitleId equals m.MainTitleId into ResultTable1
                   from result in ResultTable1.DefaultIfEmpty()
  
                   join s in _context.SubTitles
                   on c.ContentResourceId equals s.SubTitleId
                   on c.ContentResourceId equals s.SubTitleId into ResultTable2
  
                   from result2 in ResultTable2.DefaultIfEmpty()
                   select new
                   {
                       c.ResourceContent,
                       c.ContentResourceId,
                       c.MainTitleId,
                       result.Title,
                       s.SubTitle
                    }).ToList();
  
  </code></pre>
  <p>Please help me. I have seen for 1 Left Join and that is how I was able to try what I have above. I even tried the free version of LINQPad7 but I have no idea how to convert the SQL to LINQ using it. Thanks in advance.</p>