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
var gremlinClient = new GremlinClient(gremlinServer, new GraphSON2Reader(), new GraphSON2Writer(), GremlinClient.GraphSON2MimeType);
131
-
```
89
+
* Create a new `GremlinServer` and `GremlinClient` connection objects using the parameters provided above:
132
90
133
-
* Execute each Gremlin query using the `GremlinClient` object with an async task (Line 63). This will read the Gremlin queries from the dictionary defined above (Line 26):
var results = await gremlinClient.SubmitAsync<dynamic>(query.Value);
137
-
```
93
+
* Execute each Gremlin query using the `GremlinClient` object with an async task. You can read the Gremlin queries from the dictionary defined in the previous step and execute them. Later get the result and read the values, which are formatted as a dictionary, using the `JsonSerializer` class from Newtonsoft.Json package:
138
94
139
-
* Retrieve the result and read the values, which are formatted as a dictionary, using the `JsonSerializer` class from Newtonsoft.Json:
140
-
141
-
```csharp
142
-
foreach (var result in results)
143
-
{
144
-
// The vertex results are formed as dictionaries with a nested dictionary for their properties
@@ -159,29 +106,23 @@ Now go back to the Azure portal to get your connection string information and co
159
106
160
107

161
108
162
-
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`
163
-
164
-
2. In Program.cs paste the value over `your-endpoint` in the `hostname` variable in line 19.
165
-
166
-
`"private static string hostname = "<your cosmos db account name>.gremlin.cosmosdb.azure.com";`
3. Next, navigate to the **Keys** tab and copy **PRIMARY KEY** value from the portal, and paste it in the `authkey` variable, replacing the `"your-authentication-key"` placeholder in line 21.
109
+
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`
1. Next, navigate to the **Keys** tab and copy the **PRIMARY KEY** value from the Azure portal.
175
112
176
-
4. Using the information of the database created above, paste the database name inside of the `database` variable in line 22.
113
+
1. After you have 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.
5. Similarly, using the information of the container created above, paste the collection (which is also the graph name) inside of the `collection` variable in line 23.
120
+
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.
0 commit comments