Routing system should introduce some abstraction for converting route parameters to strings. #58416
Open
1 task done
Labels
Milestone
Is there an existing issue for this?
Is your feature request related to a problem? Please describe the problem.
I am working with typed ids:
If I use this value as a route parameter value and do not override
ToString
it is converted to string asFooId { Value = '....' }
. That is obviously not what I want to have in a generated URL.IMO, framework should not force my types to have a certain behavior. Writing parameter value to a URL is effectively a serialization, hence there should be the same level of flexibility/extensibility.
While framework offers outbound parameter transformers, they are not connected to the types of parameter values.
Describe the solution you'd like
I'd like ASP.NET to introduce a specific interface:
Its default implementation can just convert to string.
Additional context
The text was updated successfully, but these errors were encountered: