title: EF How to force inner join?
body: <p>I have this ef method style</p>
  
  <pre><code>            List&lt;Customer&gt; customers = db.Customers.Where( s =&gt; s.IsActive == true )
                  .Include( s =&gt; s.Communications.Select( a =&gt; a.Page ) )
                  .Include( s =&gt; s.Communications.Select( a =&gt; a.Dealership ) )
                  .Include( s =&gt; s.Communications.Select( a =&gt; a.Lead ) )
                  .ToList();
  </code></pre>
  
  <p>it will output</p>
  
  <pre><code>SELECT 
      ...
      FROM ( SELECT 
          ... 
          CASE WHEN ([Join3].[CommunicationId] IS NULL) THEN CAST(NULL AS int) ELSE 1 END AS [C1]
          FROM  [dbo].[Customer] AS [Extent1]
          LEFT OUTER JOIN  (SELECT ...
              FROM    [dbo].[Communication] AS [Extent2]
              INNER JOIN [dbo].[Page] AS [Extent3] ON [Extent2].[PageId] = [Extent3].[PageId]
              INNER JOIN [dbo].[Dealership] AS [Extent4] ON [Extent2].[DealershipId] = [Extent4].[DealershipId]
              LEFT OUTER JOIN [dbo].[Lead] AS [Extent5] ON [Extent2].[LeadId] = [Extent5].[LeadId] ) AS [Join3] ON [Extent1].[CustomerId] = [Join3].[CustomerId1]
          WHERE 1 = [Extent1].[IsActive]
      )  AS [Project1]
      ORDER BY [Project1].[CustomerId] ASC, [Project1].[C1] ASC
  </code></pre>
  
  <p>The problem is the LEFT OUTER JOIN, so it will return customer even Communication is empty. In entity class I also marked [Required] for both class Communication and Customer. How to force using inner join? </p>