Which code segment should you use?

You develop Azure solutions.

You must connect to a No-SQL globally-distributed database by using the .NET API.

You need to create an object to configure and execute requests in the database.

Which code segment should you use?
A . new Container(EndpointUri, PrimaryKey);
B . new Database(Endpoint, PrimaryKey);
C . new CosmosClient(EndpointUri, PrimaryKey);

Answer: C

Explanation:

Example:

// Create a new instance of the Cosmos Client

this.cosmosClient = new CosmosClient(EndpointUri, PrimaryKey)

//ADD THIS PART TO YOUR CODE

await this.CreateDatabaseAsync();

Reference: https://docs.microsoft.com/en-us/azure/cosmos-db/sql-api-get-started

Latest AZ-204 Dumps Valid Version with 254 Q&As

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments