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

Query Lambdas: "!a.b.Any()" supported, but "a.b.Any() == false" fails

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 2.2.4
    • Affects Version/s: 2.2
    • Component/s: Linq
    • None

      Recently did a long overdue upgrade from 1.(something) to 2.2, and am having lots of trouble migrating my wrapper code across. One thing I'm noticing is that lots of expressions I had been using previously (via linq) are simply not supported anymore, which is very odd to me. Could you clarify whether this is by design/known/etc?

      Works:
      collection.Where(mydoc => !mydoc.SomeListProperty.Any())

      Does not work:
      collection.Where(mydoc => mydoc.SomeListProperty.Any() == false)

      I will provide further info on other lambdas that are problematic, later.

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

              Created:
              Updated:
              Resolved: