Using the {id:int} syntax in an attribute route enforces that the id parameter must be of type ______.

  • String
  • Integer
  • Double
  • DateTime
The {id:int} syntax in an attribute route specifies that the id parameter must be of type integer. This is a way to ensure that the data passed in the URL is an integer value, and if it's not, the route won't match.
Add your answer
Loading...

Leave a comment

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