This is a simple issue with managing many methods across an asp.net web api project.
We have quite a few methods like this:
ProductsApiController.GetByType(string type, string x) ProductsApiController.GetByType(string type, int limit) //method has a number of arguments.. ReportsApiController.GetAll(string x, string y) The problem: We have a ton of methods with custom parameters and we have to define a custom route for each of them
routes.MapRoute( name: "ProductRoute", url: "ProductsApiController/{type}/{x}" ); routes.MapRoute( name: "ReportRoute", url: "ReportsApiController/{x}/{y}" ); I'm simplifying the signatures, there are many methods with a lot of params and these methods don't usually have params in common.
What is the general pattern to this? Is there a better way to do this or am I only left with this.