To start the program against DocumentDB then first step is to connect. connect your DocumentDB account to the two points as mentioned below:
The Endpoint is a URL to your DocumentDB account and is constructed by combining your DocumentDB account name with .documents.azure.com. Consider a dashboard as shown below.
Click on the created DocumentDB account. The details will be displayed as shown below.
By selecting the ‘Keys’ option the additional information will be displayed as shown in the below figure. The URL to your DocumentDB account is seen, which you can use as your endpoint.
The Authorization key contains credentials and there will be two types of keys. That is the master key allows full access to all resources within the account where resource tokens permit restricted access to specific resources.
Consider the console application which is created in chapter 3.
Step 1 : In the Program.cs file add the following references.
Step 2 : Add Endpoint URL and Authorization key. But in this example primary key is used as Authorization key.
Note: Both Endpoint URL and authorization key should be different.
Step 3 : The new instance of the DocumentClient should be created in asynchronous task called CreateDocumentClient and instantiate new DocumentClient.
Step 4 : Now, From Main method Call your asynchronous task.
The complete Program.cs file so far is given below:
DocumentDB Related Interview Questions
|DB2 Using SQL Interview Questions||Dbase Interview Questions|
|DB2 SQL Programming Interview Questions||Document Type Definition (DTD) Interview Questions|
|CouchDB Interview Questions||DB 400 Interview Questions|
|Documentum Interview Questions|
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.