Skip to content

Commit 5e46962

Browse files
authored
Merge pull request #198392 from seesharprun/may16-gremline-dotnet-quickstart
Update Cosmos+Gremlin .NET quickstart
2 parents cb10ef7 + 7dcbb46 commit 5e46962

File tree

1 file changed

+21
-11
lines changed

1 file changed

+21
-11
lines changed

articles/cosmos-db/graph/create-graph-dotnet.md

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ ms.custom: devx-track-dotnet, mode-api
2222
> * [PHP](create-graph-php.md)
2323
>
2424
25-
Azure Cosmos DB is Microsoft's globally distributed multi-model database service. You can quickly create and query document, key/value, and graph databases, all of which benefit from the global distribution and horizontal scale capabilities at the core of Azure Cosmos DB.
25+
Azure Cosmos DB is Microsoft's globally distributed multi-model database service. You can quickly create and query document, key/value, and graph databases. All of which benefit from the global distribution and horizontal scale capabilities at the core of Azure Cosmos DB.
2626

2727
This quickstart demonstrates how to create an Azure Cosmos DB [Gremlin API](graph-introduction.md) account, database, and graph (container) using the Azure portal. You then build and run a console app built using the open-source driver [Gremlin.Net](https://tinkerpop.apache.org/docs/3.2.7/reference/#gremlin-DotNet).
2828

@@ -56,16 +56,15 @@ Now let's clone a Gremlin API app from GitHub, set the connection string, and ru
5656
cd "C:\git-samples"
5757
```
5858

59-
3. Run the following command to clone the sample repository. This command creates a copy of the sample app on your computer.
59+
3. Run the following command to clone the sample repository. The ``git clone`` command creates a copy of the sample app on your computer.
6060

6161
```bash
6262
git clone https://github.com/Azure-Samples/azure-cosmos-db-graph-gremlindotnet-getting-started.git
6363
```
6464

6565
4. Then open Visual Studio and open the solution file.
6666

67-
5. Restore the NuGet packages in the project. This should include the Gremlin.Net driver, and the Newtonsoft.Json package.
68-
67+
5. Restore the NuGet packages in the project. The restore operation should include the Gremlin.Net driver, and the Newtonsoft.Json package.
6968

7069
6. You can also install the [email protected] driver manually using the NuGet package manager, or the [NuGet command-line utility](/nuget/install-nuget-client-tools):
7170

@@ -110,16 +109,27 @@ Now go back to the Azure portal to get your connection string information and co
110109

111110
:::image type="content" source="./media/create-graph-dotnet/endpoint.png" alt-text="Copy the endpoint":::
112111

113-
To run this sample, copy the **Gremlin Endpoint** value, delete the port number at the end, that is the URI becomes `https://<your cosmos db account name>.gremlin.cosmosdb.azure.com`. The endpoint value should look like `testgraphacct.gremlin.cosmosdb.azure.com`
112+
For this sample, record the *Host* value of the **Gremlin Endpoint**. For example, if the URI is ``https://graphtest.gremlin.cosmosdb.azure.com``, the *Host* value would be ``graphtest.gremlin.cosmosdb.azure.com``.
114113

115-
1. Next, navigate to the **Keys** tab and copy the **PRIMARY KEY** value from the Azure portal.
114+
1. Next, navigate to the **Keys** tab and record the *PRIMARY KEY* value from the Azure portal.
116115

117-
1. After you've copied the URI and PRIMARY KEY of your account, save them to a new environment variable on the local machine running the application. To set the environment variable, open a command prompt window, and run the following command. Make sure to replace <Your_Azure_Cosmos_account_URI> and <Your_Azure_Cosmos_account_PRIMARY_KEY> values.
116+
1. After you've copied the URI and PRIMARY KEY of your account, save them to a new environment variable on the local machine running the application. To set the environment variable, open a command prompt window, and run the following command. Make sure to replace ``<cosmos-account-name>`` and ``<cosmos-account-primary-key>`` values.
118117
119-
```console
120-
setx Host "<your Azure Cosmos account name>.gremlin.cosmosdb.azure.com"
121-
setx PrimaryKey "<Your_Azure_Cosmos_account_PRIMARY_KEY>"
122-
```
118+
### [Windows](#tab/windows)
119+
120+
```powershell
121+
setx Host "<cosmos-account-name>.gremlin.cosmosdb.azure.com"
122+
setx PrimaryKey "<cosmos-account-primary-key>"
123+
```
124+
125+
### [Linux / macOS](#tab/linux+macos)
126+
127+
```bash
128+
export Host=<cosmos-account-name>.gremlin.cosmosdb.azure.com
129+
export PrimaryKey=<cosmos-account-primary-key>
130+
```
131+
132+
---
123133
124134
1. Open the *Program.cs* file and update the "database and "container" variables with the database and container (which is also the graph name) names created above.
125135

0 commit comments

Comments
 (0)