When defining an attribute route, which of the following attributes would you use to specify a route for an action method?
- [Route]
- [Action]
- [Controller]
- [HttpGet]
To specify a route for an action method using attribute routing in ASP.NET Core, you would use the [Route] attribute. This attribute allows you to define the URL pattern that maps to the action method, giving you fine-grained control over routing behavior.
Loading...
Related Quiz
- How can you enforce password complexity rules when programmatically creating users in ASP.NET Core?
- _________ is the lightweight, cross-platform web server used by default with ASP.NET Core.
- Imagine you have two route templates: /products/{id} and /products/new. An incoming request has the URL /products/new. Which route will it match and why?
- For ASP.NET Core applications, which Azure service provides a fully managed platform for building, deploying, and scaling web apps?
- Integration tests are designed to test the _________ between different units or components.