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

LINQ Feature Doesn't Support $elemMatch

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 1.4.2
    • Component/s: None

      Given a collection with embedded object arrays, I find no way to do an $elemMatch using LINQ.

      e.g. (quoted from Fluent mongo wiki):

      var people = collection.AsQueryable().Where(x => x.Addresses.Any(a => a.City == "Paris"));

      Should tranlate to {"Addresses": {$elemMatch:

      {"City": "Paris"}

      }}

            Assignee:
            Unassigned Unassigned
            Reporter:
            zaidmasud Zaid Masud
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: