Question 161 of 213
Single answerYou 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. database_name = 'MyDatabase'database = client.create_database_if_not_exists(id=database_name) B. client = CosmosClient(endpoint, key) Most Voted C. container_name = 'MyContainer'container = database.create_container_if_not_exists(id=container_name, partition_key=PartitionKey(path="/lastName"), offer_throughput=400 )
A database_name = 'MyDatabase'database = client.create_database_if_not_exists(id=database_name)
B client = CosmosClient(endpoint, key) Most Voted
✓C container_name = 'MyContainer'container = database.create_container_if_not_exists(id=container_name, partition_key=PartitionKey(path="/lastName"), offer_throughput=400 )
✓
Correct Answer: C
container_name = 'MyContainer'container = database.create_container_if_not_exists(id=container_name, partition_key=PartitionKey(path="/lastName"), offer_throughput=400 )
▥
Explanation
The correct answer is highlighted above. Review the wording carefully, then use the next question to continue building your understanding of Microsoft certification topics.