title: Combine inner join and left join in Entity Framework query
body: <p>I have 3 classes / tables: <code>Car</code>, <code>User</code> and <code>UserVote</code> (which is a bridging table between the other two).</p>
  
  <p>For example:</p>
  
  <pre><code>Car (id / name):
  1 / Ford Focus
  2 / Honda Civic
  3 / Citroen C2
  
  User (id / ignoreUser):
  1 / false
  2 / true
  3 / false
  
  UserVote (UserId / CarId)
  1 / 2
  1 / 3
  2 / 1
  3 / 2
  </code></pre>
  
  <p>I have a method which gets the top x cars based on the number of votes.</p>
  
  <pre><code>public IQueryable&lt;Car&gt; GetTopCars(int count)
  {
      return context.Car
          .Include(car =&gt; car.UserVote)
          .Where(car =&gt; car.UserVote.Count &gt; 0)
          .OrderByDescending(car =&gt; car.UserVote.Count)
          .Take(count);
  }
  </code></pre>
  
  <p>This code only looks at the Cars and UserVote table and doesn't look at the ignoreUser field on User. I am trying to update my Entity Framework code to join to the User table, but I'm not having any success. Ultimately I am looking to get a list of Cars ordered by the number of UserVotes, excluding those with IgnoreUser set to true. In the above example, I would like the method to return IQueryable in the correct order (Honda Civic then Citroen C2).</p>
  
  <p>I think I want to take Cars and then left join this to User inner joined with UserVote? Is this possible with Entity Framework?</p>
  
  <p>This question follows on from the advice given in a comment to a <a href="https://stackoverflow.com/questions/37642564/how-to-only-count-votes-from-first-user-with-an-ip-address-in-entity-framework">previous question</a>.</p>