title: How can I find a document by GUID _id?
body: <p>I use this code to retrieve some documents:</p>
  
  <pre><code>var client = new MongoClient(connectionString);
  var database = client.GetDatabase(databaseName);
  var collection = database.GetCollection&lt;BsonDocument&gt;(collectionName);
  
  var json = "{created: {$gte: ISODate(\"2018-12-20T00:00:00.000Z\"), $lt: 
  ISODate(\"2018-12-21T00:00:00.000Z\")}}";
  BsonDocument query = MongoDB.Bson.Serialization.BsonSerializer.Deserialize&lt;BsonDocument&gt;(json);
  var documents = collection.Find(query).Limit(10);
  </code></pre>
  
  <p>The results look like this:</p>
  
  <pre><code>{ "_id" : CSUUID("75c5634c-b64b-4484-81f5-5b213228e272"), ..., "created" : ISODate("2018-12-20T23:59:13.375Z") }
  </code></pre>
  
  <p>I'm having trouble retrieving this same document when trying to filter on _id.
  Here are the filters I've tried (using the same code as above) and have not been able to retrieve the document:</p>
  
  <pre><code>var json = "{ \"_id\" : \"75c5634c-b64b-4484-81f5-5b213228e272\" }";
  var json = "{ \"_id\" : CSUUID(\"75c5634c-b64b-4484-81f5-5b213228e272\") }";
  var json = "{ \"_id\" : new BinData(4, \"TGPFdUu2hESB9VshMijicg==\") }";
  var json = "{ \"_id\" : BinData(4, \"TGPFdUu2hESB9VshMijicg==\") }";
  var json = "{ \"_id\" : new BinData(3, \"TGPFdUu2hESB9VshMijicg==\") }";
  var json = "{ \"_id\" : BinData(3, \"TGPFdUu2hESB9VshMijicg==\") }";
  var json = "{ \"_id\" : { $eq: \"TGPFdUu2hESB9VshMijicg==\" } }";
  var json = "{ \"_id\" : { $binary: \"TGPFdUu2hESB9VshMijicg==\", $type: 4 } }";
  var json = "{ \"_id\" : { $binary: \"TGPFdUu2hESB9VshMijicg==\", $type: 3 } }";
  </code></pre>
  
  <p>Note, <code>TGPFdUu2hESB9VshMijicg==</code> was retrieved by getting a base 64 encoded string from the guid like this:</p>
  
  <pre><code>Convert.ToBase64String((new Guid("75c5634c-b64b-4484-81f5-5b213228e272")).ToByteArray())
  </code></pre>
  
  <p>None of the queries throw any exceptions, but they return no documents.</p>