Microsoft Azure Developer Associate AZ-204 Practice Question

You are developing a .NET 6 web API that must retrieve a very large dataset from an Azure Cosmos DB container. The code must stream results in pages of 100 items, automatically handle continuation tokens, and avoid loading the full result set into memory. Which SDK approach should you choose to meet these requirements?

  • Use CosmosClient.CreateFeedIterator() to obtain a FeedIterator and iterate over it without specifying MaxItemCount.

  • Call Container.GetItemQueryIterator() with MaxItemCount = 100 and loop through the returned FeedIterator using ReadNextAsync().

  • Invoke a nonexistent Container.ReadAllItemsAsync() method to download every document, then process the results in memory.

  • Execute a stored procedure by using Container.Scripts.ExecuteStoredProcedureAsync() and return the full query results in a single response.

Microsoft Azure Developer Associate AZ-204
Develop for Azure storage
Your Score:
Settings & Objectives
Random Mixed
Questions are selected randomly from all chosen topics, with a preference for those you haven’t seen before. You may see several questions from the same objective or domain in a row.
Rotate by Objective
Questions cycle through each objective or domain in turn, helping you avoid long streaks of questions from the same area. You may see some repeat questions, but the distribution will be more balanced across topics.

Check or uncheck an objective to set which questions you will receive.

Bash, the Crucial Exams Chat Bot
AI Bot