title: MongoDB C# driver: Using Linq to get Guid returns nothing
body: <p>The following is the code I am using to query the database. The variable "filter" is a linq expression. It seems that I can use this code to get data using ObjectId or any other value that may be in the document. But when I store a Guid and try to retrieve it, there is no return. Is there something I am doing wrong here, or is there a limitation on MongoDB itself when it comes to Guids? </p>
  
  <pre><code>        _dbSet = mongoDatabase.GetCollection(collectionName);
          var query = _dbSet.AsQueryable&lt;TEntity&gt;();
  
          if (filter != null)
          {
              query = query.Where(filter);
          }
  
          return query.ToList();
  </code></pre>
  
  <p><strong>EDIT:</strong></p>
  
  <p>Just to clarify a bit more. I have tried the solution shown here in the last comment: <a href="https://stackoverflow.com/questions/21051096/mongodb-and-guid-in-linq-where-clause">MongoDB and Guid in Linq Where clause</a>. That does not give me a result either. The data I am trying to retrieve contains just the _id field.</p>
  
  <pre><code>{
      "_id" : LUUID("e5bdda3b-ae6a-d942-bd43-c8c7a6803096")
  }
  </code></pre>
  
  <p>The entity being used to retrieve this object has only a property called Id which, from what I understand, translates to the _id field in the Mongo document. So I tried retrieving on the Id property as well. Still no result.</p>