title: Entity Framework and forced Inner Join
body: <p>I have Table1 with the following relationships (they are not enforced they only create the relationship for the navigation properties)</p>
  
  <pre>
  Table1 (*)->(1) Table2
  Table1 (*)->(1) Table3
  Table1 (*)->(1) Table4
  Table1 (*)->(1) Table5
  </pre>
  
  <p>Using eager loading code looks like</p>
  
  <pre><code>IQueryable&lt;Table1&gt; query = context.Table1s;
  
  query = query.Include(Table1 =&gt; Table1.Table2);
  query = query.Include(Table1 =&gt; Table1.Table3);
  query = query.Include(Table1 =&gt; Table1.Table4);
  query = query.Include(Table1 =&gt; Table1.Table5);
  
  query = query.Where(row =&gt; row.Table1Id == table1Id);
  
  query.Single();
  </code></pre>
  
  <p>Every way I try to organize the Include() statements, the first table included has an Inner Join in its generated TSQL and the remaining are Left Outer Join (I expect Left Outer for all of them). I am not Entity Splitting, they are just plain tables with FKs.</p>
  
  <p>If DefaultIfEmpty() is the only solution, can someone explain the reason why when all but the first table included provide the SQL expected?</p>
  
  <p>My understanding is that default behavior for a Navigation Property is LEFT OUTER but I cannot get ALL properties to generate the default.</p>
  
  <p>Any help would be MUCH appreciated.</p>
  
  <p>Thank you in advance!</p>
  
  <p>----- Created TSQL (modified for brevity but structure the same) -------</p>
  
  <pre>
  (@p__linq__0 int)SELECT 
  [Limit1].[Table1Id] AS [Table1Id], 
  [Limit1].[OtherData] AS [OtherData]
  FROM ( SELECT TOP (2) 
      [Extent1].[Table1Id] AS [Table1Id], 
      [Extent1].[OtherData] As [OtherData]
      FROM       [dbo].[Table1] AS [Extent1]
      INNER JOIN [dbo].[Table2] AS [Extent2] ON [Extent1].[Table2Id] = [Extent2].[Table2Id]
      LEFT OUTER JOIN [dbo].[Table3] AS [Extent3] ON [Extent1].[Table3Id] = [Extent3].[Table3Id]
      LEFT OUTER JOIN [dbo].[Table4] AS [Extent4] ON [Extent1].[Table4Id] = [Extent4].[Table4Id]
      LEFT OUTER JOIN [dbo].[Table5] AS [Extent5] ON [Extent1].[Table5Id] = [Extent5].[Table5Id]
      WHERE [Extent1].[Table1Id] = @p__linq__0
  )  AS [Limit1]
  </pre>