Think before you jump
It is possible but is not feasible. They've provided route configuration to be static in Global.asax, because routes tend to be static and stay the same for a long time. If they don't, you'll have SEO problems anyway. So I'd advise you to first stop and actually think if you really need configurable routes.
But it's possible
But it's possible to use DB in the background to have your routes defined. In your case you could store values as serialized string key/value pairs, because RouteValuesDictionary
can accept key-value pairs as well to feed values in.
If your route definitions stay the same in terms of defaults/constraints, but not URLs, you could provide your own interface and provide classes that implement it. In this case you could just store URLs and class definitions (similar as they are defined in web.config
) that define values for a particular route. This way it will make it very simple to use complex object configurations if you need them...