You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Docs/reference/content/getting_started/quick_tour.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -207,7 +207,7 @@ Each of the above examples will print the exact same thing to the console. For m
207
207
We can create a filter to pass to the [`Find`]({{< apiref "Overload_MongoDB_Driver_IMongoCollectionExtensions_Find" >}}) method to get a subset of the documents in our collection. For example, if we wanted to find the document for which the value of the “i” field is 71, we would do the following:
{{% note %}}Use the [Filter]({{< relref "reference\driver\definitions.md#filters" >}}), [Sort]({{< relref "reference\driver\definitions.md#sorts" >}}), and [Projection]({{< relref "reference\driver\definitions.md#projections" >}}) builders for simple and concise ways of building up queries.{{% /note %}}
@@ -231,7 +231,7 @@ and it should print just one document:
231
231
We can also get a set of documents from our collection. For example, if we wanted to get all documents where `i > 50`, we could write:
We add a sort to a find query by calling the [`Sort`]({{< apiref "M_MongoDB_Driver_IFindFluent_2_Sort" >}}) method. Below we use the [`Exists`]({{< apiref "Overload_MongoDB_Driver_FilterDefinitionBuilder_1_Exists" >}}) filter builder method and [`Descending`]({{< apiref "Overload_MongoDB_Driver_SortDefinitionBuilder_1_Descending" >}}) sort builder method to sort our documents:
@@ -299,8 +299,8 @@ There are numerous [update operators](https://www.mongodb.com/docs/manual/refere
299
299
To update at most 1 document (may be 0 if none match the filter), use the [`UpdateOne`]({{< apiref "M_MongoDB_Driver_IMongoCollection_1_UpdateOne" >}}) or [`UpdateOneAsync`]({{< apiref "M_MongoDB_Driver_IMongoCollection_1_UpdateOneAsync" >}}) methods to specify the filter and the update document. Here we update the first document that meets the filter `i == 10` and set the value of `i` to `110`:
To update all documents matching the filter use the [`UpdateMany`]({{< apiref "M_MongoDB_Driver_IMongoCollection_1_UpdateMany" >}}) or [`UpdateManyAsync`]({{< apiref "M_MongoDB_Driver_IMongoCollection_1_UpdateManyAsync" >}}) methods. Here we increment the value of `i` by `100` where `i < 100`.
@@ -341,7 +341,7 @@ The update methods return an [`UpdateResult`]({{< apiref "T_MongoDB_Driver_Updat
341
341
To delete at most 1 document (may be 0 if none match the filter) use the [`DeleteOne`]({{< apiref "M_MongoDB_Driver_IMongoCollection_1_DeleteOne" >}}) or [`DeleteOneAsync`]({{< apiref "M_MongoDB_Driver_IMongoCollection_1_DeleteOneAsync" >}}) methods:
To delete all documents matching the filter use the [`DeleteMany`]({{< apiref "M_MongoDB_Driver_IMongoCollection_1_DeleteMany" >}}) or [`DeleteManyAsync`]({{< apiref "M_MongoDB_Driver_IMongoCollection_1_DeleteManyAsync" >}}) methods. Here we delete all documents where `i >= 100`:
0 commit comments