Think Before You Jump
It is possible, but it is impossible. They provided the route configuration static in Global.asax, because routes are usually static and remain unchanged for a long time. If they do not, you will have problems with SEO anyway. Therefore, I would advise you to first stop and think about whether you really need custom routes.
But probably
But it is possible to use the database in the background to determine your routes. In your case, you can store values ββas serialized string / value pairs, since RouteValuesDictionary can accept key-value pairs, and also enter values.
If the route definitions remain unchanged in terms of default values ββ/ restrictions, but not URLs, you can provide your own interface and provide classes that implement it. In this case, you can simply store the URLs and class definitions (similar to how they are defined in web.config ) that define values ββfor a specific route. Thus, it is very easy to use complex configurations of objects if you need them ...
Robert Koritnik
source share