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: articles/cosmos-db/nosql/quickstart-dotnet.md
+19-17Lines changed: 19 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,14 +26,16 @@ Get started with the Azure Cosmos DB client library for .NET to create databases
26
26
27
27
## Prerequisites
28
28
29
-
* An Azure account with an active subscription. [Create an account for free](https://aka.ms/trycosmosdb).
30
-
*[.NET 6.0 or later](https://dotnet.microsoft.com/download)
31
-
*[Azure Command-Line Interface (CLI)](/cli/azure/) or [Azure PowerShell](/powershell/azure/)
29
+
- An Azure account with an active subscription.
30
+
- If you don't have an Azure subscription, create a [free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
31
+
- Alternatively, you can [try Azure Cosmos DB free](../try-free.md) before you commit.
32
+
-[.NET 6.0 or later](https://dotnet.microsoft.com/download)
33
+
-[Azure Command-Line Interface (CLI)](/cli/azure/) or [Azure PowerShell](/powershell/azure/)
32
34
33
35
### Prerequisite check
34
36
35
-
* In a terminal or command window, run ``dotnet --version`` to check that the .NET SDK is version 6.0 or later.
36
-
* Run ``az --version`` (Azure CLI) or ``Get-Module -ListAvailable AzureRM`` (Azure PowerShell) to check that you have the appropriate Azure command-line tools installed.
37
+
- In a terminal or command window, run ``dotnet --version`` to check that the .NET SDK is version 6.0 or later.
38
+
- Run ``az --version`` (Azure CLI) or ``Get-Module -ListAvailable AzureRM`` (Azure PowerShell) to check that you have the appropriate Azure command-line tools installed.
37
39
38
40
## Setting up
39
41
@@ -90,21 +92,21 @@ Build succeeded.
90
92
91
93
You'll use the following .NET classes to interact with these resources:
92
94
93
-
*[``CosmosClient``](/dotnet/api/microsoft.azure.cosmos.cosmosclient) - This class provides a client-side logical representation for the Azure Cosmos DB service. The client object is used to configure and execute requests against the service.
94
-
*[``Database``](/dotnet/api/microsoft.azure.cosmos.database) - 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.
95
-
*[``Container``](/dotnet/api/microsoft.azure.cosmos.container) - This class is a reference to a container that also may not exist in the service yet. The container is validated server-side when you attempt to work with it.
96
-
*[``QueryDefinition``](/dotnet/api/microsoft.azure.cosmos.querydefinition) - This class represents a SQL query and any query parameters.
97
-
*[``FeedIterator<>``](/dotnet/api/microsoft.azure.cosmos.feediterator-1) - This class represents an iterator that can track the current page of results and get a new page of results.
98
-
*[``FeedResponse<>``](/dotnet/api/microsoft.azure.cosmos.feedresponse-1) - This class represents a single page of responses from the iterator. This type can be iterated over using a ``foreach`` loop.
95
+
-[``CosmosClient``](/dotnet/api/microsoft.azure.cosmos.cosmosclient) - This class provides a client-side logical representation for the Azure Cosmos DB service. The client object is used to configure and execute requests against the service.
96
+
-[``Database``](/dotnet/api/microsoft.azure.cosmos.database) - 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.
97
+
-[``Container``](/dotnet/api/microsoft.azure.cosmos.container) - This class is a reference to a container that also may not exist in the service yet. The container is validated server-side when you attempt to work with it.
98
+
-[``QueryDefinition``](/dotnet/api/microsoft.azure.cosmos.querydefinition) - This class represents a SQL query and any query parameters.
99
+
-[``FeedIterator<>``](/dotnet/api/microsoft.azure.cosmos.feediterator-1) - This class represents an iterator that can track the current page of results and get a new page of results.
100
+
-[``FeedResponse<>``](/dotnet/api/microsoft.azure.cosmos.feedresponse-1) - This class represents a single page of responses from the iterator. This type can be iterated over using a ``foreach`` loop.
99
101
100
102
## Code examples
101
103
102
-
*[Authenticate the client](#authenticate-the-client)
103
-
*[Create a database](#create-a-database)
104
-
*[Create a container](#create-a-container)
105
-
*[Create an item](#create-an-item)
106
-
*[Get an item](#get-an-item)
107
-
*[Query items](#query-items)
104
+
-[Authenticate the client](#authenticate-the-client)
105
+
-[Create a database](#create-a-database)
106
+
-[Create a container](#create-a-container)
107
+
-[Create an item](#create-an-item)
108
+
-[Get an item](#get-an-item)
109
+
-[Query items](#query-items)
108
110
109
111
The sample code described in this article creates a database named ``adventureworks`` with a container named ``products``. The ``products`` table is designed to contain product details such as name, category, quantity, and a sale indicator. Each product also contains a unique identifier.
0 commit comments