title: SQL generated by Entity Framework is missing a join
body: <p>We noticed this query has a high amount of reads:</p>
  
  <pre><code>var var1 = "535d1a11-1c2b-467a-3333-222aaa9b1fd4";
  var var2 = 117;
  var test = (from t1 in contextObj.Table1
      join t2 in contextObj.Table2
          on t1.Column2 equals t2.Column1
      join t3 in contextObj.Table3 on t2.Column2 equals t3.Column1
      where t3.Column1 == var1 &amp;&amp; t2.Column3 == var2
                               &amp;&amp; t2.Column2 == var1
      select t1).ToList();
  </code></pre>
  
  <p>This is because the SQL generated by Entity Framework is missing a join: </p>
  
  <pre><code>exec sp_executesql N'SELECT 
      [Extent1].[Column1] AS [Column1], 
      [Extent1].[Column2] AS [Column2], 
      [Extent1].[Column3] AS [Column3], 
      [Extent1].[Column4] AS [Column4], 
      [Extent1].[Column5] AS [Column5], 
      [Extent1].[Column6] AS [Column6]
      FROM  [dbo].[Table1] AS [Extent1]
      INNER JOIN [dbo].[Table2] AS [Extent2] ON [Extent1].[Column2] = [Extent2].[Column1]
      WHERE ([Extent2].[Column2] = @p__linq__0) AND ([Extent2].[Column3] = @p__linq__1) AND ([Extent2].[Column2] = @p__linq__2)',N'@p__linq__0 nvarchar(4000),@p__linq__1 int,@p__linq__2 nvarchar(4000)',@p__linq__0=N'535d5b16-1c2b-467a-9022-933ebf9b1fd4',@p__linq__1=117,@p__linq__2=N'535d5b16-1c2b-467a-9022-933ebf9b1fd4'
  </code></pre>
  
  <p>Database create script: <a href="https://gist.github.com/jbouwens/85e8840d799b8178ee30feb389fbc4ac" rel="nofollow noreferrer">https://gist.github.com/jbouwens/85e8840d799b8178ee30feb389fbc4ac</a></p>
  
  <p>Why did EF not include this join/what can I do to prevent this in the future? Thanks!</p>