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
Currently, to get a route to a given endpoint, we must rely either on magic strings, or the endpoint must be given a name for use with link generator or redirect response.
The routes, at least, could be source-generated, and perhaps available as a static property of the handler. For example, GetAllBooks.Route.
As a step above that, and a step towards the safe-routing way, a whole redirect result object could be created, so that return TypedResults.Redirect(nameof(GetAllBooks)) or similar can be replaced with return GetAllBooks.Redirect or some such.
The text was updated successfully, but these errors were encountered:
Inspired by https://github.com/daviddotcs/safe-routing
Currently, to get a route to a given endpoint, we must rely either on magic strings, or the endpoint must be given a name for use with link generator or redirect response.
The routes, at least, could be source-generated, and perhaps available as a static property of the handler. For example,
GetAllBooks.Route
.As a step above that, and a step towards the
safe-routing
way, a whole redirect result object could be created, so thatreturn TypedResults.Redirect(nameof(GetAllBooks))
or similar can be replaced withreturn GetAllBooks.Redirect
or some such.The text was updated successfully, but these errors were encountered: