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?
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?
To connect to a No-SQL globally-distributed database using the .NET API, you need to create an instance of the CosmosClient class. The CosmosClient class is designed specifically for handling interactions with Azure Cosmos DB, which is a globally-distributed No-SQL database. By creating a new CosmosClient object using the EndpointUri and PrimaryKey, you can configure and execute requests against the database. This approach is standard practice for connecting to Azure Cosmos DB in .NET.
The Answer is correct!
Correct Answer: C Azure Cosmos DB is a fully managed NoSQL database for modern app development. Single-digit millisecond response times, and automatic and instant scalability, guarantee speed at any scale. // 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/dotnet/api/microsoft.azure.cosmos.cosmosclient?view=azure-dotnet https://docs.microsoft.com/en-us/azure/cosmos-db/sql-api-get-started
Got this one 01/2022. Went with most voted (to avoid writing answers again)
Got this in the exam 01/22
Got this one 02/2022. Went with highly voted answer.
correct.
But why we assume it is Cosmos? App needs to access some No-SQL database that may already exist - maybe it is Cosmos, maybe not
https://docs.microsoft.com/en-us/azure/cosmos-db/sql-api-get-started public static async Task Main(string[] args) { } // ADD THIS PART TO YOUR CODE /* Entry point to call methods that operate on Azure Cosmos DB resources in this sample */ public async Task GetStartedDemoAsync() { // Create a new instance of the Cosmos Client this.cosmosClient = new CosmosClient(EndpointUri, PrimaryKey); answer is correct
Correct answer. CosmosClient is the only one with the appropriate constructor. https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.cosmosclient.-ctor?view=azure-dotnet https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.database.-ctor?view=azure-dotnet https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.container.-ctor?view=azure-dotnet
Order: Cosmos Client > Database > Container > Item
There are two ways by which we can created cosmosclient instance. 1. CosmosClient cosmosClient = new CosmosClient(connectionString); 2. CosmosClient cosmosClient = new CosmosClient(EndpointUri, PrimaryKey) So answer C is correct.
Answer : C
Got it in exam 03/22
C is correct answer. Global fully managed No-SQL DB = CosmosDB
I dont get this question, Cosmos DB is a No-SQL globally-distributed database, but there are others that .NET can connect.
Yes, but "You develop Azure solutions."
The correct answer is C.
The Answer is correct!
C. new CosmosClient(EndpointUri, PrimaryKey);
CosmosClient(String, String, CosmosClientOptions) https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.cosmosclient?view=azure-dotnet
Correct Answer: C
wow. finally one correct answer.
cosmosclient is the entry point for interacting with Azure Cosmos DB