Im searching the best way for manage long urls in routing. I have many actions which looks like this:
/a/b/c/d/e
the route:
routes.MapRoute(
"xxx",
"{a}/{b}/{c}/{d}/{e}",
new { controller = "Xxx", action="Xxx"});
the controller:
public ActionResult Xxx(int a, int b, int c, int d, int e) { ... }
any change in params gives multi-change in every route/action, and that is the problem. Its not elastic. Is there any possibility to map params to some object? Something that would look like:
public ActionResult Xxx(RouteParams rp) { ... }
Hmm... eventually I think that I could use the Action Filter to solve this:
private RouteParams rp;
public override void OnActionExecuting(FilterExecutingContext filterContext) {
rp = new RouteParams(...);
}
but I dont like this solution
Best regards