Add support for Enumerable.Any in LINQ queries

XMLWordPrintableJSON

    • Type: New Feature
    • Resolution: Done
    • Priority: Major - P3
    • 1.5
    • Affects Version/s: 1.4
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Add support for LINQ queries like:

      var query1 = from c in collection.AsQueryable<C>()
                   where c.A.Any(a => (a % 2) == 0 && a > 2)
                   select c;
      

      This example assumes c.A is an array of ints and is looking for documents where c.A contains an even number greater than 2. It requires use of $elemMatch, but there is some concern about use of $elemMatch when the array values are not embedded documents.

      In any case, full support for mapping arbitrary C# predicates on array elements requires robust $elemMatch support in the server, including support for scalar or document values as well as $and and $or.

            Assignee:
            Craig Wilson
            Reporter:
            Robert Stam
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: