Skip to content

Commit 9c4f7bf

Browse files
committed
rr feedback
1 parent 4ee975f commit 9c4f7bf

File tree

1 file changed

+23
-19
lines changed

1 file changed

+23
-19
lines changed

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

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,8 @@ The ``BulkWriteInsertOneModel<TDocument>`` constructor accepts the following par
8686
| **Data Type:** ``TDocument``
8787

8888
The following example creates an instance of the ``BulkWriteInsertOneModel<TDocument>``
89-
class. The
90-
``BsonDocument`` object represents a new restaurant named "Mongo's Deli" to be inserted
91-
into the ``sample_restaurants.restaurants`` collection.
89+
class. This instance directs the driver to insert a document in which the ``"name"`` field
90+
is ``"Mongo's Deli"`` into the ``sample_restaurants.restaurants`` collection.
9291

9392
.. literalinclude:: /includes/fundamentals/code-examples/BulkWrite.cs
9493
:start-after: start-bulk-insert-one
@@ -186,10 +185,10 @@ accepts the same parameters as the ``BulkWriteUpdateOneModel<TDocument>`` constr
186185
The ``BulkWriteUpdateManyModel<TDocument>``
187186
operation updates *all documents* that match your query filter.
188187

189-
The following example creates an instance of the ``BulkWriteUpdateManyModel<TDocument>``
190-
class, and uses ``BsonDocument`` as the type for ``TDocument``. The
191-
filter matches all documents in the ``sample_restaurants.restaurants`` collection
192-
where the value of the ``name`` field is ``"Mongo's Deli"``. The update operation sets
188+
In the following code example, the ``BulkWriteUpdateManyModel<BsonDocument>`` object
189+
represents an update operation on the ``sample_restaurants.restaurants`` collection.
190+
The operation matches all documents in the collection where
191+
the value of the ``name`` field is ``"Mongo's Deli"``. It then updates
193192
the value of the ``cuisine`` field to ``"Sandwiches and Salads"``.
194193

195194
.. literalinclude:: /includes/fundamentals/code-examples/BulkWrite.cs
@@ -256,12 +255,12 @@ constructor accepts the following parameters:
256255
| **Data Type:** {+bool-data-type+}
257256
| **Default:** ``false``
258257

259-
The following example creates an instance of the ``BulkWriteReplaceOneModel<TDocument>``
260-
class, and uses ``BsonDocument`` as the type for ``TDocument``. The
261-
filter matches the document in the ``sample_restaurants.restaurants`` collection
262-
where the value of the ``restaurant_id`` field is ``"1234"``. The replace operation
263-
removes all fields from this document and sets new values in the ``name``, ``cuisine``,
264-
``borough``, and ``restaurant_id`` fields.
258+
In the following example, the ``BulkWriteReplaceOneModel<BsonDocument>`` object
259+
represents a replace operation on the ``sample_restaurants.restaurants`` collection.
260+
The operation matches the document in the collection
261+
where the value of the ``restaurant_id`` field is ``"1234"``. It then
262+
removes all fields other than ``_id`` from this document, and sets new values in the
263+
``name``, ``cuisine``, ``borough``, and ``restaurant_id`` fields.
265264

266265
.. literalinclude:: /includes/fundamentals/code-examples/BulkWrite.cs
267266
:start-after: start-bulk-replace-one
@@ -317,9 +316,9 @@ parameters:
317316
| **Data Type:** `BsonValue <{+new-api-root+}/MongoDB.Bson/MongoDB.Bson.BsonValue.html>`__
318317
| **Default:** ``null``
319318

320-
The following example creates an instance of the ``BulkWriteDeleteOneModel<TDocument>``
321-
class, and uses ``BsonDocument`` as the type for ``TDocument``. The
322-
filter matches the document in the ``sample_restaurants.restaurants`` collection
319+
In the following code example, the ``BulkWriteDeleteOneModel<BsonDocument>`` object
320+
represents a delete operation on the ``sample_restaurants.restaurants`` collection.
321+
The operation matches and deletes the first document
323322
where the value of the ``restaurant_id`` field is ``"5678"``.
324323

325324
.. literalinclude:: /includes/fundamentals/code-examples/BulkWrite.cs
@@ -334,9 +333,14 @@ class and pass a query filter that specifies the document that you want to delet
334333
The ``DeleteMany`` operation removes *all documents* that match your
335334
query filter.
336335

337-
The following example creates an instance of the ``BulkWriteDeleteManyModel<TDocument>``
338-
class, and uses ``BsonDocument`` as the type for ``TDocument``. The
339-
filter matches the document in the ``sample_restaurants.restaurants`` collection
336+
In the following code example, the ``BulkWriteDeleteOneModel<BsonDocument>`` object
337+
represents a delete operation on the ``sample_restaurants.restaurants`` collection.
338+
The operation matches and deletes the first document
339+
where the value of the ``restaurant_id`` field is ``"5678"``.
340+
341+
In the following code example, the ``BulkWriteDeleteManyModel<BsonDocument>`` object
342+
represents a delete operation on the ``sample_restaurants.restaurants`` collection.
343+
The operation matches and deletes all documents
340344
where the value of the ``name`` field is ``"Mongo's Deli"``.
341345

342346
.. literalinclude:: /includes/fundamentals/code-examples/BulkWrite.cs

0 commit comments

Comments
 (0)