I am using the .Net MVC4 Web API to (hopefully) implement a RESTful api. I need to pass in a few parameters to the system and have it perform some action, then return a lis
I think the easiest way is to simply use AttributeRouting.
It's obvious within your controller, why would you want this in your Global WebApiConfig file?
Example:
[Route("api/YOURCONTROLLER/{paramOne}/{paramTwo}")]
public string Get(int paramOne, int paramTwo)
{
return "The [Route] with multiple params worked";
}
The {} names need to match your parameters.
Simple as that, now you have a separate GET that handles multiple params in this instance.