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

LINQ Feature Doesn't Support $elemMatch

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Duplicate
    • Affects Version/s: 1.4.2
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      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"}

      }}

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: