title: MongoDB and C# - How do I query for all documents matching a list of given ID values?
body: <p>I have set up my database so that the ID property of my class is the ID of the document:</p>
  
  <pre><code>BsonClassMap.RegisterClassMap&lt;TestClass&gt;(cm =&gt;
  {
      cm.AutoMap();
      cm.SetIdMember(cm.GetMemberMap(c =&gt; c.ID));
  });
  </code></pre>
  
  <p>To query for a specific document, I can successfully use:</p>
  
  <pre><code>collection.FindOneById(123);
  </code></pre>
  
  <p>However if I try the equivalent as a query:</p>
  
  <pre><code>collection.FindOne(Query.EQ("ID", 123));
  </code></pre>
  
  <p>No results are returned.</p>
  
  <p>How do I include the document ID as part of the query and/or how do I query for a list of documents matching a given set of IDs? Do I have to literally query them one by one?</p>
  
  <p><strong>EDIT</strong>
  To clarify, I'm not talking about an internal MongoDB-assigned object ID, I'm talking about the ID assigned by the user as the unique key/id identifying that document for later retrieval.</p>