I would like all controllers which inherit from AdminBaseApiController
to be prefixed with 'admin'.
This works fine of course:
[RoutePrefix("admin")]
public class ToggleController : AdminBaseApiController
{
[Route("toggle")]
public HttpResponseMessage Get()
{
}
}
However when I move the RoutePrefix("admin")
out of the ToggleController
and into the AdminBaseApiController
(where I want it) - The route fails and I get a 404.
Am I looking at this all wrong? Thanks in advance!