@@ -44,7 +44,7 @@ The following sections describe these methods in more detail.
4444 Many of the methods in this guide have multiple overloads. The examples
4545 in this guide use the simplest overload for demonstration purposes. For
4646 more information about the available overloads, see the
47- :manual:` {+new-api-root+} API documentation </api-reference>`.
47+ `API documentation. {+new-api-root+}/index.html>`__
4848
4949.. tip:: Interactive Lab
5050
@@ -73,7 +73,7 @@ methods all accept the following parameters:
7373 - An instance of the ``FilterDefinition`` class that specifies the documents to update.
7474 To learn how to create a query filter, see :ref:`csharp-specify-query`.
7575
76- **Data Type:** `FilterDefinition<TDocument> <{+new-api-root+>/MongoDB.Driver/MongoDB.Driver.FilterDefinition-1.html>`__
76+ **Data Type:** `FilterDefinition <{+new-api-root+>/MongoDB.Driver/MongoDB.Driver.FilterDefinition-1.html>`__
7777
7878 * - ``update``
7979 - An instance of the ``UpdateDefinition`` class. This object specifies the kind of update
@@ -99,8 +99,8 @@ Update Multiple Values
9999----------------------
100100
101101The ``UpdateOne()``, ``UpdateOneAsync()``, ``UpdateMany()``, and ``UpdateManyAsync()``
102- methods each accept one ``UpdateDefinition`` object. The following sections describe how
103- to multiple values in a single method call.
102+ methods each accept only one ``UpdateDefinition`` object. The following sections describe how
103+ to update multiple values in a single method call.
104104
105105Combine Update Definitions
106106~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -124,13 +124,13 @@ The ``Combine()`` method returns a single ``UpdateDefinition`` object that defin
124124multiple update operations.
125125
126126The following code example uses the ``Combine()`` method to combine a
127- :manual:`$set </reference/operator/update/set/#mongodb-update-up.-set>` operation and a
128- :manual:`$pop </reference/operator/update/pop/#mongodb-update-up.-pop >`
127+ :manual:`$set </reference/operator/update/set/#mongodb-update-up.-set>` operation and an
128+ :manual:`$unset </reference/operator/update/pop/#mongodb-update-up.-unset >`
129129operation:
130130
131131.. tabs::
132132
133- .. tab:: UpdateOne (Synchronous )
133+ .. tab:: UpdateOne (Sync )
134134 :tabid: update-one-sync
135135
136136 .. literalinclude:: /includes/code-examples/update-one/UpdateOne.cs
@@ -140,7 +140,7 @@ operation:
140140 :start-after: // start-combine-sync
141141 :end-before: // end-combine-sync
142142
143- .. tab:: UpdateOne (Asynchronous )
143+ .. tab:: UpdateOne (Async )
144144 :tabid: update-one-async
145145
146146 .. literalinclude:: /includes/code-examples/update-one/UpdateOne.cs
@@ -150,7 +150,7 @@ operation:
150150 :start-after: // start-combine-async
151151 :end-before: // end-combine-async
152152
153- .. tab:: UpdateMany (Synchronous )
153+ .. tab:: UpdateMany (Sync )
154154 :tabid: update-many-sync
155155
156156 .. literalinclude:: /includes/code-examples/update-many/UpdateMany.cs
@@ -160,7 +160,7 @@ operation:
160160 :start-after: // start-combine-sync
161161 :end-before: // end-combine-sync
162162
163- .. tab:: UpdateMany (Asynchronous )
163+ .. tab:: UpdateMany (Async )
164164 :tabid: update-many-async
165165
166166 .. literalinclude:: /includes/code-examples/update-many/UpdateMany.cs
@@ -173,8 +173,12 @@ operation:
173173Update Pipelines
174174~~~~~~~~~~~~~~~~
175175
176- Builders.Update.Pipeline is used to create an update pipeline for MongoDB update operations. An update pipeline allows you to specify a sequence of update stages that modify the documents in a collection. Each stage in the pipeline is an update operation that transforms the document in some way. This is similar to the aggregation pipeline but is used specifically for updates.
177- This method accepts the following parameter:
176+ If your application connects to {+mdb-server+} 4.2 or later, you can join
177+ a sequence of update operations into a single
178+ :manual:`aggregation pipeline. </core/aggregation-pipeline/>`
179+
180+ To create an update pipeline, call the ``Builders.Update.Pipeline()`` method. This method
181+ accepts the following parameter:
178182
179183.. list-table::
180184 :widths: 30 70
@@ -184,17 +188,69 @@ This method accepts the following parameter:
184188 - Description
185189
186190 * - ``pipeline``
187- - A ``PipelineDefinition`` instance that specifies the update pipeline.
191+ - A ``PipelineDefinition`` instance that represents the update pipeline. To create
192+ a ``PipelineDefinition`` object, create a BSON object for each update operation you
193+ want to perform, then pass these objects to the ``Pipeline.Create()`` method.
188194
189195 **Data Type:** ``PipelineDefinition<TDocument, TDocument>``
190196
191- .. tip:: Aggregation Pipelines in Update Operations
197+ The ``Pipeline()`` method returns a single ``UpdateDefinition`` object that defines
198+ multiple aggregation stages.
199+
200+ The following code example uses the ``Pipeline()`` method to combine a
201+ :manual:`$set </reference/operator/update/set/#mongodb-update-up.-set>` operation and an
202+ :manual:`$unset </reference/operator/update/pop/#mongodb-update-up.-unset>`
203+ operation:
204+
205+ .. tabs::
206+
207+ .. tab:: UpdateOne (Sync)
208+ :tabid: update-one-sync
209+
210+ .. literalinclude:: /includes/code-examples/update-one/UpdateOne.cs
211+ :language: csharp
212+ :copyable: true
213+ :dedent:
214+ :start-after: // start-pipeline-sync
215+ :end-before: // end-pipeline-sync
216+
217+ .. tab:: UpdateOne (Async)
218+ :tabid: update-one-async
219+
220+ .. literalinclude:: /includes/code-examples/update-one/UpdateOne.cs
221+ :language: csharp
222+ :copyable: true
223+ :dedent:
224+ :start-after: // start-pipeline-async
225+ :end-before: // end-pipeline-async
226+
227+ .. tab:: UpdateMany (Sync)
228+ :tabid: update-many-sync
229+
230+ .. literalinclude:: /includes/code-examples/update-many/UpdateMany.cs
231+ :language: csharp
232+ :copyable: true
233+ :dedent:
234+ :start-after: // start-pipeline-sync
235+ :end-before: // end-pipeline-sync
236+
237+ .. tab:: UpdateMany (Async)
238+ :tabid: update-many-async
239+
240+ .. literalinclude:: /includes/code-examples/update-many/UpdateMany.cs
241+ :language: csharp
242+ :copyable: true
243+ :dedent:
244+ :start-after: // start-pipeline-async
245+ :end-before: // end-pipeline-async
246+
247+ .. note:: Unsupported Operations
192248
193- If you are using MongoDB Version 4.2 or later, you can use aggregation
194- pipelines made up of a subset of aggregation stages in update operations . For
195- more information on the aggregation stages MongoDB supports in
196- aggregation pipelines used in update operations, see the tutorial about building
197- :manual:`updates with aggregation pipelines </tutorial/update-documents-with-aggregation-pipeline/>` .
249+ Update pipelines don't support all update operations, but they do support certain
250+ aggregation stages not found in other update definitions . For a list of
251+ update operations supported by pipelines, see
252+ :manual:`Updates with Aggregation Pipeline </ tutorial/update-documents-with-aggregation-pipeline/>`
253+ in the {+mdb-server+} manual .
198254
199255.. _csharp-update-options:
200256
0 commit comments