Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-806

Support Fieldname Indexers in a Linq Query

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.9
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      BsonDocuments should be able to be used in LINQ queries for when BsonDocuments are either the root or exposed as properties.

      query = Query<BsonDocument>.Where(doc => doc["Name"] == "Bob McBob");
      
      //
      
      query = Query<BsonDocument>.Where(doc => doc["Children"][0]["Name"] == "Jack");
      
      //
      
      query = Query<BsonDocument>.Where(doc => doc["Children"][0]["Age"] > 20);
      

            Assignee:
            craig.wilson@mongodb.com Craig Wilson
            Reporter:
            craig.wilson@mongodb.com Craig Wilson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: