exam questions

Exam AZ-203 All Questions

View all questions & answers for the AZ-203 exam

Exam AZ-203 topic 3 question 3 discussion

Actual exam question from Microsoft's AZ-203
Question #: 3
Topic #: 3
[All AZ-203 Questions]

You use Azure Table storage to store customer information for an application. The data contains customer details and is partitioned by last name.
You need to create a query that returns all customers with the last name Smith.
Which code segment should you use?

  • A. TableQuery.GenerateFilterCondition("PartitionKey", Equals, "Smith")
  • B. TableQuery.GenerateFilterCondition("LastName", Equals, "Smith")
  • C. TableQuery.GenerateFilterCondition("PartitionKey", QueryComparisons.Equal, "Smith")
  • D. TableQuery.GenerateFilterCondition("LastName", QueryComparisons.Equal, "Smith")
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️
Retrieve all entities in a partition. The following code example specifies a filter for entities where 'Smith' is the partition key. This example prints the fields of each entity in the query results to the console.
Construct the query operation for all customer entities where PartitionKey="Smith".
TableQuery<CustomerEntity> query = new TableQuery<CustomerEntity>().Where(TableQuery.GenerateFilterCondition("PartitionKey", QueryComparisons.Equal,
"Smith"));
References:
https://docs.microsoft.com/en-us/azure/cosmos-db/table-storage-how-to-use-dotnet

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Larry616
Highly Voted 4 years, 10 months ago
Answer is correct
upvoted 6 times
...
ss22
Most Recent 4 years, 4 months ago
Given answer is correct
upvoted 1 times
...
bugimachi
4 years, 5 months ago
Better link: https://docs.microsoft.com/en-us/azure/cosmos-db/table-storage-design-guide
upvoted 2 times
...
SidSadhu
4 years, 10 months ago
Correct
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...