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

Add an overload to Update that takes a pipeline argument

    • Type: Icon: New Feature New Feature
    • Resolution: Unresolved
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: CRUD
    • None
    • Dotnet Drivers

      You can update a document with calculated values using a pipeline like this:

      var pipeline = new EmptyPipelineDefinition<C>().Set(x => new { A = x.B });
      var result = collection.UpdateMany("{}", pipeline);

      But this is not easily discoverable in Intellisense because it depends on the existence of an implicit conversion from PipelineDefinition to UpdateDefinition.

      We should add overload(s) to Update that take a PipelineDefinition argument.

      This will probably require removing the implicit conversion to avoid ambiguity between overloads, and therefore would be a small breaking change.

            Assignee:
            Unassigned Unassigned
            Reporter:
            robert@mongodb.com Robert Stam
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: