Route attribute routing with query strings when there are multiple routes
问题 I have this: [HttpGet] [Route("Cats")] public IHttpActionResult GetByCatId(int catId) [HttpGet] [Route("Cats")] public IHttpActionResult GetByName(string name) They are called by providing the query string eg Cats?catId=5 However MVC Web API will say you can't have multiple routes that are the same (both routes are "Cats". How can I get this to work so MVC Web API will recognize them as separate routes? Is there something I can put into the Route property? It says that ? is an invalid