Skip to content

Commit 2c0e416

Browse files
committed
wip
1 parent 440ea50 commit 2c0e416

File tree

3 files changed

+17
-41
lines changed

3 files changed

+17
-41
lines changed

source/fundamentals/crud/write-operations/update.txt

+8-8
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ methods all accept the following parameters:
9393
* - ``cancellationToken``
9494
- *Optional.* A token that you can use to cancel the operation.
9595

96-
**Data type**: `CancellationToken <https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken>`__
96+
**Data type**: ``CancellationToken``
9797

9898
Update Multiple Values
9999
----------------------
@@ -102,8 +102,8 @@ The ``UpdateOne()``, ``UpdateOneAsync()``, ``UpdateMany()``, and ``UpdateManyAsy
102102
methods each accept only one ``UpdateDefinition`` object. The following sections describe how
103103
to update multiple values in a single method call.
104104

105-
Combine Update Definitions
106-
~~~~~~~~~~~~~~~~~~~~~~~~~~
105+
Combined Update Definitions
106+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
107107

108108
The ``Builders.Update.Combine()`` method lets you combine multiple ``UpdateDefinition``
109109
objects. This method accepts the following parameter:
@@ -190,7 +190,7 @@ accepts the following parameter:
190190
* - ``pipeline``
191191
- A ``PipelineDefinition`` instance that represents the update pipeline. To create
192192
a ``PipelineDefinition`` object, create a BSON document for each update operation you
193-
want to perform, then pass these documents to the ``Pipeline.Create()`` method.
193+
want to perform, then pass these documents to the ``PipelineDefinition.Create()`` method.
194194

195195
**Data Type:** ``PipelineDefinition<TDocument, TDocument>``
196196

@@ -199,7 +199,7 @@ multiple aggregation stages.
199199

200200
The following code example uses the ``Pipeline()`` method to combine a
201201
:manual:`$set </reference/operator/update/set/#mongodb-update-up.-set>` operation and an
202-
:manual:`$unset </reference/operator/update/pop/#mongodb-update-up.-unset>`
202+
:manual:`$unset </reference/operator/update/unset/#mongodb-update-up.-unset>`
203203
operation:
204204

205205
.. tabs::
@@ -254,11 +254,11 @@ operation:
254254

255255
.. _csharp-update-options:
256256

257-
Customize the Update Operation
258-
------------------------------
257+
Configuration Options
258+
---------------------
259259

260260
The update methods optionally accept an ``UpdateOptions`` object as a
261-
parameter. You can use this argument to customize the update operation.
261+
parameter. You can use this argument to configure the update operation.
262262

263263
The ``UpdateOptions`` class contains the following properties:
264264

source/fundamentals/crud/write-operations/update/arrays.txt

+7-32
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ Overview
2323
On this page, you can learn how to use the {+driver-long+} to update array
2424
fields in MongoDB documents. This page describes how to create ``UpdateDefinition<TDocument>``
2525
objects that specify the update operations you want to perform on array fields.
26-
You can pass these objects to the update methods described on *this page.*
26+
You can pass these objects to the update methods described on the
27+
:ref:`<csharp-update-documents>` page.
2728

2829
The {+driver-short+} supports the array update operators and modifiers described in the
2930
:manual:`{+mdb-server+} manual </reference/operator/update/#array>`.
@@ -325,17 +326,17 @@ To update all array elements that match your query filter, use the all positiona
325326
The following code example queries the ``restaurants`` collection for a document
326327
that contains a grade of 2. It then updates that grade to 22 in the matching documents.
327328

328-
329-
Updating Documents with LINQ3
330-
-----------------------------
329+
LINQ3 Provider
330+
~~~~~~~~~~~~~~
331331

332332
LINQ syntax contains a positional operator (``$``) that you can use to update elements in an array field.
333333
Previous versions of the {+driver-short+} supported both the LINQ2 and LINQ3 providers.
334334
In LINQ2, you could use ``-1`` to indicate use of the positional operator.
335335

336336
For example, the ``Restaurant`` class contains an array field named ``Grades`` that
337-
contains multiple ``GradeEntry`` elements. The following code sample uses LINQ2 to update the
338-
``Grade`` field of the first element in the ``Grades`` array:
337+
contains multiple ``GradeEntry`` elements. If your application were using the LINQ2
338+
provider, you could use the following code sample to update the
339+
``Grade`` field of the first element in this array:
339340

340341
.. code-block:: csharp
341342
:linenos:
@@ -372,29 +373,3 @@ contains multiple ``GradeEntry`` elements. The following code sample uses LINQ2
372373
Builders<Restaurant>.Update.Set(l => l.AnArrayMember.ElementAt(-1).Deleted, true));
373374

374375
This no longer works in LINQ3. Instead, you must use the following syntax:
375-
376-
.. list-table::
377-
:widths: 30 70
378-
:header-rows: 1
379-
380-
* - Elements to Match
381-
* - LINQ Syntax
382-
- {+driver-short+} Syntax
383-
384-
* - First matching element
385-
* - ``array.$``
386-
- | Specifies the positional operator in LINQ3.
387-
See :manual:`the MongoDB server manual</reference/operator/update/positional>`
388-
for more information.
389-
390-
* - All elements
391-
* - ``array.$[]``
392-
- | Specifies the positional operator in LINQ3.
393-
See :manual:`the MongoDB server manual</reference/operator/update/positional>`
394-
for more information.
395-
396-
* - All matching elements
397-
* - ``array.$[<identifier>]``
398-
- | Specifies the positional operator in LINQ3.
399-
See :manual:`the MongoDB server manual</reference/operator/update/positional>`
400-
for more information.

source/fundamentals/crud/write-operations/update/fields.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ Overview
2323
On this page, you can learn how to use the {+driver-long+} to update
2424
fields in MongoDB documents. This page describes how to create ``UpdateDefinition<TDocument>``
2525
objects that specify the update operations you want to perform on fields.
26-
You can pass these objects to the update methods described on *this page.*
26+
You can pass these objects to the update methods described on the
27+
:ref:`<csharp-update-documents>` page.
2728

2829
The {+driver-short+} supports the field update operators described in the
2930
:manual:`{+mdb-server+} manual </reference/operator/update/#fields>`. To specify an

0 commit comments

Comments
 (0)