Skip to content

Commit ebc624c

Browse files
Merge pull request #220253 from seesharprun/seesharprun-patch-1
Cosmos DB | Fix ASP.NET + NoSQL tutorial typos
2 parents b1ac154 + 8a89ef1 commit ebc624c

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

articles/cosmos-db/nosql/tutorial-dotnet-web-app.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ms.reviewer: esarroyo
99
ms.service: cosmos-db
1010
ms.subservice: nosql
1111
ms.topic: tutorial
12-
ms.date: 11/02/2022
12+
ms.date: 12/02/2022
1313
ms.devlang: csharp
1414
ms.custom: devx-track-dotnet, ignite-2022, cosmos-dev-refresh, cosmos-dev-dotnet-path
1515
---
@@ -319,25 +319,25 @@ Next, you'll add the Azure SDK for .NET to this sample project and use the libra
319319
private readonly CosmosClient _client;
320320
```
321321
322-
1. Create a new empty constructor for the `CosmosClient` class.
322+
1. Create a new empty constructor for the `CosmosService` class.
323323
324324
```csharp
325-
public CosmosClient()
325+
public CosmosService()
326326
{ }
327327
```
328328
329329
1. Within the constructor, create a new instance of the `CosmosClient` class passing in a string parameter with the **PRIMARY CONNECTION STRING** value you previously recorded in the lab. Store this new instance in the `_client` member.
330330
331331
```csharp
332-
public CosmosClient()
332+
public CosmosService()
333333
{
334334
_client = new CosmosClient(
335335
connectionString: "<primary-connection-string>"
336336
);
337337
}
338338
```
339339
340-
1. Back within the **CosmosClient** class, create a new `private` property of type `Container` named `container`. Set the **get accessor** to return the `cosmicworks` database and `products` container.
340+
1. Back within the **CosmosService** class, create a new `private` property of type `Container` named `container`. Set the **get accessor** to return the `cosmicworks` database and `products` container.
341341
342342
```csharp
343343
private Container container
@@ -485,12 +485,9 @@ Finally, you'll run the application with **hot reloads** enabled. Running the ap
485485
1. Back in the terminal, run the application.
486486
487487
```bash
488-
dotnet watch
488+
dotnet run
489489
```
490490
491-
> [!NOTE]
492-
> `dotnet watch` is enabled here so you can quickly change the code if you find a mistake.
493-
494491
1. The output of the run command should include a list of ports and URLs where the application is running. Open a new browser and navigate to the running web application. Observe all three pages of the running application. Each page should now include live data from Azure Cosmos DB.
495492
496493
## Clean up resources

0 commit comments

Comments
 (0)