-
I'm using netcore 3.1 (not aspnet 5) and wondering if it's 'ok' to assign custom data to the resulting RouteValueDictionary when using DynamicRouteValueTransformer? With old ways of dynamic routing before endpoint routing we might have stored arbitrary data in DataTokens but this isn't available in the DynamicRouteValueTransformer, only the RouteValueDictionary is available to populate. This is normally just used for a couple values like "action", "controller", "id" or perhaps other action parameter names. But if I want to store an object result from a data lookup in there to use downstream. This totally works fine but wondering if this is frowned upon or if there are repercussions in doing this? I see that in aspnet 5 there are improvements to DynamicRouteValueTransformer which has a State object. I'm not quite sure what the use of that is and if it's for this purpose or not. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I have used HttpRequest Features instead which was much cleaner. |
Beta Was this translation helpful? Give feedback.
I have used HttpRequest Features instead which was much cleaner.