title: Querying a collection via a match in an ID-to-ID collection in MongoDB using C# Driver
body: <p>I have the following collection document types:</p>
  <pre><code>Car
  {
     Id
     Make
     Model
  }
  </code></pre>
  <p>and</p>
  <pre><code>UserCar
  {
     UserId
     CarId   (references Car.Id)
  }
  </code></pre>
  <p>I'm having trouble finding the correct query using MongoDB C# Driver to:</p>
  <blockquote>
  <p>Get all Cars where UserId = x</p>
  </blockquote>
  <p>This is a very simple query in SQL, so I'm quite frustrated that this is proving so difficult with their SDK (for me, at least). It's the ID-to-ID collection containing the filter that seems to be the issue. So, starting with:</p>
  <pre><code>var db = MongoUtil.GetDb();
  var cars = db.GetCollection&lt;Car&gt;(&quot;Cars&quot;);
  var userCars = db.GetCollection&lt;UserCar&gt;(&quot;UserCars&quot;);
  
  List&lt;Car&gt; carsJoined = ??? where UserId = 1234
  </code></pre>
  <p>Thanks for the help.</p>