With the new MVC Attribute routing, I know you can assign multiple Route
attributes to a single ActionResult
, but I am looking for a way to do the same at the RoutePrefix
level. I have a controller which, in every action, should be accessible by three routes:
/Games/{Title}/Characters/{Route}
/Books/{Title}/Characters/{Route}
/Cinema/{Title}/Characters/{Route}
I tried putting three individual RoutePrefix
attributes, but I get the error Deuplace RoutePrefix attribute
. If I try to use a comma-separated list, I get Best override method for does not contain a constructor that takes 3 arguments
.
Is it possible to set up a RoutePrefix
so that it takes the three routes I want for my controller?