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

Support expression trees for updates

    XMLWordPrintableJSON

Details

    • Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Minor - P4 Minor - P4
    • None
    • None
    • Feature Request

    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

            Unassigned Unassigned
            david.golub@mongodb.com David Golub
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: