Skip to content

Commit 06e501e

Browse files
committed
create - not get
1 parent 26a27f2 commit 06e501e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

articles/cosmos-db/nosql/quickstart-dotnet.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,12 +210,13 @@ Use the [``CosmosClient.CreateDatabaseIfNotExistsAsync``](/dotnet/api/microsoft.
210210
For more information on creating a database, see [Create a database in Azure Cosmos DB for NoSQL using .NET](how-to-dotnet-create-database.md).
211211

212212

213-
### Get the container
213+
### Create a container
214214

215-
The [``Database.GetContainer``](/dotnet/api/microsoft.azure.cosmos.database.getcontainer) will return a reference to the specified container.
215+
The [``Database.CreateContainerIfNotExistsAsync``](/dotnet/api/microsoft.azure.cosmos.database.createcontainerifnotexistsasync) will create a new container if it doesn't already exist. This method will also return a reference to the container.
216216

217-
:::code language="csharp" source="~/cosmos-db-nosql-dotnet-samples/002-quickstart-passwordless/Program.cs" id="new_container" highlight="2,4":::
217+
:::code language="csharp" source="~/cosmos-db-nosql-dotnet-samples/001-quickstart/Program.cs" id="new_container" highlight="3-5":::
218218

219+
For more information on creating a container, see [Create a container in Azure Cosmos DB for NoSQL using .NET](how-to-dotnet-create-container.md).
219220

220221
---
221222

0 commit comments

Comments
 (0)