title: oData filter not working on navigation property with MongoDB and Web API
body: <p>Controller looks like </p>
  
  <pre><code>    public class NodesRestController : ODataController
  {
      private INodeService _nodeService;
      public NodesRestController(INodeService nodeService)
      {
          _nodeService = nodeService;
      }
      [EnableQuery()]
      public IQueryable&lt;Node&gt; Get()
      {
          return _nodeService.GetAllNodes();
      }
      [EnableQuery()]
      public Node Get(string id)
      {
          return _nodeService.GetNodeById(id);
      }
  }
  </code></pre>
  
  <p>in MongoDb repository i am returning AsQueryable of the collection.  </p>
  
  <pre><code>//..............Rest of initializations
  
  
  
   _collection = _dbContext.Database
              .GetCollection&lt;TEntity&gt;(typeof(TEntity).Name);
  //..........
  
      public IQueryable&lt;TEntity&gt; GetAll()
      {
          return _collection.AsQueryable();
      }
  
  
  
  public TEntity Insert(TEntity entity)
      {
          entity.Id = ObjectId.GenerateNewId().ToString();
           _collection.Insert(entity);
          return entity;
      }
  
      //..............Rest of initializations
  </code></pre>
  
  <p>MongoDB Document looks like </p>
  
  <pre><code>{
  "_id" : "5688d5b1d5ae371c60ffd8ef",
  "Name" : "RTR1",
  "IP" : "1.2.2.22",
  "NodeGroup" : {
      "_id" : "5688d5aad5ae371c60ffd8ee",
      "Name" : "Group One",
      "Username" : null,
      "Password" : null
  }}
  </code></pre>
  
  <p>Id were generated using ObjectId.GenerateNewId().ToString() so  they are stored as string.</p>
  
  <p>Node and NodeGroup are pure POCOs</p>
  
  <pre><code>public partial class NodeGroup : EntityBase
  {
      public string Name { get; set; }
      public string Username { get; set; }
      public string Password { get; set; }
      public string LoginPrompt { get; set; }
      public string PasswordPrompt { get; set; }
      public string ReadyPrompt { get; set; }
      public string Description { get; set; }
  }
   public partial class Node : EntityBase
  {
      public string Name { get; set; }
      public string IP { get; set; }
      public virtual NodeGroup NodeGroup { get; set; }
  }
  public abstract class EntityBase 
  {
      //[JsonIgnore]
      // [BsonRepresentation(BsonType.ObjectId)]
      // [BsonId]
      public string Id { get; set; }
  }
  </code></pre>
  
  <p><strong>Problem</strong></p>
  
  <p>oData URIs like </p>
  
  <pre><code>http://localhost:9910/api/NodesRest
  http://localhost:9910/api/NodesRest?$expand=NodeGroup
  http://localhost:9910/api/NodesRest?$expand=NodeGroup&amp;$filter=Name eq 'RTR1'
  </code></pre>
  
  <p>works fine. </p>
  
  <p>But when i try to filter on Navigation Property </p>
  
  <pre><code>http://localhost:9910/api/NodesRest?$expand=NodeGroup&amp;$filter=NodeGroup/Name eq 'Group One'
  </code></pre>
  
  <p>it gives me exception </p>
  
  <p><em>message: "Unable to determine the serialization information for the expression: ConditionalExpression.",</em></p>