title: Query UUID Key using Linq + MongoDb Driver
body: <p>I'm having a hard time querying a MongoDb collection by the _id key, all other keys works smoothly but the _id, I believe is something related to the way that Mongo stores de _id (as Binary). I have tried almost everything I found about mongo + C# GUIDs, a lot here in StackOverflow, but nothing seems to work.</p>
  <p>Using MongoDb.Driver 2.11.5</p>
  <p>Here is my document</p>
  <pre><code>_id:UUID('e68b2095-2d53-46a6-bca6-1e13f7bd2d26'),
  DateCreated:2021-01-14T00:38:18.368+00:00,
  IsActive:true,
  Name:&quot;The Witcher&quot;
  </code></pre>
  <p>Entity</p>
  <pre><code>public class Game
  {
      public Game(Guid id, string name, DateTime dateCreated, bool isActive)
      {
          Id = id;
          Name = name;
          DateCreated = dateCreated;
          IsActive = isActive;
      }
  
      public Guid Id { get; private set; }
      public string Name { get; private set; }
      public DateTime DateCreated { get; private set; } = DateTime.Now;
      public bool IsActive { get; private set; } = true;
  
  }
  </code></pre>
  <p>Repository class</p>
  <p>Here is the problem, <code>dt</code> returns the Entity it should, but <code>dt2</code> is always null</p>
  <pre><code>public async Task GetById(Guid id)
  {
      var dt = DbSet.AsQueryable().Where(x =&gt; x.Name == &quot;The Witcher&quot;).FirstOrDefault();
      var dt2 = DbSet.AsQueryable().Where(x =&gt; x.Id == id).FirstOrDefault();
  }
  </code></pre>
  <p>Mapping class</p>
  <pre><code>public GameConfig()
  {
      BsonClassMap.RegisterClassMap&lt;Game&gt;(cm =&gt;
      {
          cm.AutoMap();
          cm.MapIdMember(c =&gt; c.Id);
      });
  }
  </code></pre>
  <p>Config apply (This is called by the startup class before the MongoDB connection is opened)</p>
  <pre><code>public class NoSqlEntitiesConfigurer
  {
      public void Configure()
      {
          BsonSerializer.RegisterSerializer(new GuidSerializer(GuidRepresentation.Standard));
          new GameConfig();
          new SectionConfig();
      }
  }
  </code></pre>