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
Get started with MongoDB to create databases, collections, and docs within your Cosmos DB resource. Follow these steps to install the package and try out example code for basic tasks.
@@ -24,7 +26,7 @@ Get started with MongoDB to create databases, collections, and docs within your
24
26
## Prerequisites
25
27
26
28
* An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free).
*[Azure Command-Line Interface (CLI)](/cli/azure/install-azure-cli) or [Azure PowerShell](/powershell/azure/install-az-ps)
29
31
30
32
### Prerequisite check
@@ -34,7 +36,7 @@ Get started with MongoDB to create databases, collections, and docs within your
34
36
35
37
## Setting up
36
38
37
-
This section walks you through creating an Azure Cosmos account and setting up a project that uses the MongoDB NuGet packages.
39
+
This section walks you through creating an Azure Cosmos account and setting up a project that uses the MongoDB NuGet packages.
38
40
39
41
### Create an Azure Cosmos DB account
40
42
@@ -72,7 +74,7 @@ This quickstart will create a single Azure Cosmos DB account using the MongoDB A
72
74
73
75
### Create a new .NET app
74
76
75
-
Create a new .NET application in an empty folder using your preferred terminal. Use the [``dotnet new console``](/dotnet/core/tools/dotnet-newt) to create a new console app.
77
+
Create a new .NET application in an empty folder using your preferred terminal. Use the [``dotnet new console``](/dotnet/core/tools/dotnet-newt) to create a new console app.
76
78
77
79
```console
78
80
dotnet new console -o <app-name>
@@ -100,9 +102,9 @@ Before you start building the application, let's look into the hierarchy of reso
100
102
101
103
You'll use the following MongoDB classes to interact with these resources:
102
104
103
-
-[``MongoClient``](https://mongodb.github.io/mongo-csharp-driver/2.16/apidocs/html/T_MongoDB_Driver_MongoClient.htm) - This class provides a client-side logical representation for the MongoDB API layer on Cosmos DB. The client object is used to configure and execute requests against the service.
104
-
-[``MongoDatabase``](https://mongodb.github.io/mongo-csharp-driver/2.16/apidocs/html/T_MongoDB_Driver_MongoDatabase.htm) - This class is a reference to a database that may, or may not, exist in the service yet. The database is validated server-side when you attempt to access it or perform an operation against it.
105
-
-[``Collection``](https://mongodb.github.io/mongo-csharp-driver/2.16/apidocs/html/T_MongoDB_Driver_MongoCollection.htm) - This class is a reference to a collection that also may not exist in the service yet. The collection is validated server-side when you attempt to work with it.
105
+
*[``MongoClient``](https://mongodb.github.io/mongo-csharp-driver/2.16/apidocs/html/T_MongoDB_Driver_MongoClient.htm) - This class provides a client-side logical representation for the MongoDB API layer on Cosmos DB. The client object is used to configure and execute requests against the service.
106
+
*[``MongoDatabase``](https://mongodb.github.io/mongo-csharp-driver/2.16/apidocs/html/T_MongoDB_Driver_MongoDatabase.htm) - This class is a reference to a database that may, or may not, exist in the service yet. The database is validated server-side when you attempt to access it or perform an operation against it.
107
+
*[``Collection``](https://mongodb.github.io/mongo-csharp-driver/2.16/apidocs/html/T_MongoDB_Driver_MongoCollection.htm) - This class is a reference to a collection that also may not exist in the service yet. The collection is validated server-side when you attempt to work with it.
106
108
107
109
## Code examples
108
110
@@ -151,7 +153,7 @@ public record Product(
151
153
);
152
154
```
153
155
154
-
Create an item in the collection using the `Product` record by calling [``IMongoCollection<TDocument>.InsertOne``](https://mongodb.github.io/mongo-csharp-driver/2.16/apidocs/html/M_MongoDB_Driver_IMongoCollection_1_InsertOne_1.htm).
156
+
Create an item in the collection using the `Product` record by calling [``IMongoCollection<TDocument>.InsertOne``](https://mongodb.github.io/mongo-csharp-driver/2.16/apidocs/html/M_MongoDB_Driver_IMongoCollection_1_InsertOne_1.htm).
0 commit comments