✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
Quel est la correction nécessaire pour faire fonctionner ce code ?
[ApiController]
public class ApiController : ControllerBase
{
[Route("/api/[controller]/[action]/{id:int}")]
public String GetObject(int id)
{
if (id > 10)
return BadRequest();
return id.ToString();
}
}