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

Support expression trees for updates

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Open
    • Priority: Minor - P4
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Feature Request
    • Labels:

      Description

      It would be awesome if we could use expression trees to specify not just queries but also updates. For example, we might update set or increment fields as follows:

      collection.UpdateOne(model => model.Id == id1, model => model.Name = newName);
      collection.UpdateOne(model => model.Id == id2, model => model.Count++);
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              david.golub David Golub
              Participants:
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: