From what I understand, the route map with the format
name: "DefaultApi",
routeTemplate: "api/{controller}/{id}",
defaults: new { id = RouteParameter.Optional }
maps the url "/api/file/1" to the controller "FileController" and the GET method contained within that controller which accepts a string input called "id". Similarly, if I had the url "/api/meeting/1", it would map to the controller "MeetingController" and the GET method accepting a string input called "id".
Is it possible to have both of the above two, instead, map to the same controller?
IE, can I somehow set up a "DefaultController", which takes the URL "/api/file/1", and maps it to a method called "GetData(string id)"? And then within that method, can I somehow obtain the "file" part?
The reason I ask this is because the "FileController" and "MeetingController" described above would, in implementation, be identical. The only difference would be that the parameter passed to the function which I use to get my data, would change from "file" to "meeting".