-
Type: New Feature
-
Resolution: Unresolved
-
Priority: 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.
- related to
-
CSHARP-3677 How to update document field with another field
- Closed