The [______] attribute in ASP.NET Core is used to specify the route template for an action method.

  • Route
  • HttpPost
  • Authorize
  • ValidateAntiForgeryToken
In ASP.NET Core, the [Route] attribute is used to define the route template for an action method. This template determines how the URL should be structured to access the method. For example, [Route("api/products")] specifies that the method should be reachable at the URL "api/products."
Add your answer
Loading...

Leave a comment

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