I can't seem to find an answer to this question so I'm posting it here. This may be a basic routing question and perhaps I'm just missing something obvious. I have a WebAPI2 project that has GetAll() method in the controller. I'm using Attribute Routing including a RoutePrefix. When I test the method using Postman it works fine http://localhost/api/v1/Suppressions and it returns a list of JSON from my Mongo DB collection. By chance during testing I happened to test and added a parameter to the URL thinking I would receive a "The resource cannot be found" error http://localhost/api/v1/Suppressions?name=abc but it instead called the GetAll() method.
During routing are parameters ignored and is the URI the only thing used (unless, of course, I have a method that specifically named the parameters like Get(string name))? If that's the case, is there a route constraint that I need to add to my GetAll() method in order to throw the "The resource annot be found" error if someone inadvertently called the method with a parameter or list of parameters?