I have two controllers for my User model. One is a regular MVC controller which handles the views and inherits from Controller. Then I have an API controller which inherits from ApiController. Their names are UsersController and UsersApiController respectively. I wish to remove from "Api" from the API controller's URL so I can type:
www.mywebsite.com/api/Users
rather than:
www.mywebsite.com/api/UsersApi
which contains a redundant "api".
I have tried applying the attribute [Route("Users")] and [Route("api/Users")] to the entire controller but neither work and they seem to just break it. My WebApiConfig.cs has the default route config.
How can I do this?