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.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *