You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am wondering what is the token replacement for, as in routes like [Route("[controller]/[action]")]...
I mean I know they will replace the placeholders. on the other hand my source code reading suggests that this will also work: [Route("{controller}/{action}")].
I think so because in case of attribute routing it still seems to do what it does for conventional routing, add one endpoint per action descriptor, replacing matching parameters with required values, and required values contain the "controller" and "action".
But I assume I am wrong or don't understand something if the token replacement thing exists. What is it all about, then?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am wondering what is the token replacement for, as in routes like
[Route("[controller]/[action]")]
...I mean I know they will replace the placeholders. on the other hand my source code reading suggests that this will also work:
[Route("{controller}/{action}")]
.I think so because in case of attribute routing it still seems to do what it does for conventional routing, add one endpoint per action descriptor, replacing matching parameters with required values, and required values contain the "controller" and "action".
But I assume I am wrong or don't understand something if the token replacement thing exists. What is it all about, then?
Beta Was this translation helpful? Give feedback.
All reactions