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

Allow LINQ lambda expressions to be used for queries in .Remove and .Update operations

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None

      The Query and Query<T> API's that we have to use for Update and Remove operations are pretty verbose and annoying to work with. It would be great to be able to use lambda expressions instead.

      E.g. instead of

      coll.Update(Query.Or(Query.EQ("Id", "..."), Query.EQ("Name", "John")), update)

      we could do

      coll.Update(o => o.Id == "..." || o.Name == "John", update)

      Same for Remove.

      Pull request is on it's way...

            Assignee:
            Unassigned Unassigned
            Reporter:
            eeg@trustpilot.com Einar Egilsson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: