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
{{ message }}
This repository was archived by the owner on Dec 14, 2018. It is now read-only.
Scenario:
A rest route like {controller}/{id?} could be used by multiple controllers. Each controller might want to use a different parameter name for id (ex: customerId, orderId) in their actions.
We need an aliasing feature (for example, Web API has a Name property on the FromUri attribute) through which a user can supply a different name than the one defined on route variable.
Web API example: public IActionResult Get([FromUri(Name='id') int orderId])
Note:
The above scenario could probably be accomplished by using Attribute Routing where the route template can be defined close to the action with different variable names. But here we would be forcing users to use attribute routing which is not good.
Also action's parameter values could be coming from Query String or other custom value providers(ex: reading from Request Headers) and aliasing could be required in these scenarios too.