hiexam
microsoft · AZ-204 · Q665 · code_completion · azure_functions, durable_entities, code_completion

HOTSPOT - You are developing an online game that allows players to vote for their favorite photo that illustrates a wo…

HOTSPOT - You are developing an online game that allows players to vote for their favorite photo that illustrates a word. The game is built by using Azure Functions and uses durable entities to track the vote count. The voting window is 30 seconds. You must minimize latency. You need to implement the Azure Function for voting. How should you complete the code? To answer, select the appropriate options in the answer area. //IMG//
[FunctionName("Vote")]
public static async Task<HttpResponseMessage> Run(
    [HttpTrigger("POST", Route = "pic/{id}")] HttpRequestMessage req, {{slot1}},
    string id)
{
    var eid = new EntityId("pic", id);

    await {{slot2}}(eid, "vote");

    return req.CreateResponse(HttpStatusCode.OK);
}
Correct slot values

Answer hidden

Unlock AZ-204

First 5 questions of every exam are free. Unlock the rest.

Includes
  • · All — questions
  • · Verified answers + AI explanations
  • · Spaced-repetition mistake notebook
  • · Phone, tablet, laptop sync

One-time payment. Doesn't auto-renew. · Already paid? Sign in