I am setting up an MVC 5 site. In the same project, I setup a WebAPI scaffolding.
For MVC, my routing looks like this:
{controller}/{action}/{id}
I want my API route to look like this:
Person/edit/15
For WebAPI, my routing looks like this:
api/{controller}/{id}
I want my API route to look like this:
api/Person/15
The problem is, I have a controller called PersonController.cs which inherits from Controller. I seem to need another controller called PersonController.cs which inherits from ApiController.
Can this be done, or is there another solution?