Kizspy | Question: 21
(Choose 1 answer)
The following C# code in a .NET creates an endpoint. What does it do?
app.MapGet("/products/{id}", (int id=> {
// Logic to find a product by id
return Results.Ok($"Product {id}");
});
A. It defines an endpoint that creates a new product.
B. It defines an endpoint that retrieves a product by its ID using a POST request.
C. It defines an endpoint that retrieves a product by its ID using a GET request.
D. It defines an endpoint that deletes a product by its ID.
PJOVERFLOW.COM