Web Api Core 2 distinguishing GETs
问题 Why can't Web API Core 2 tell these apart? [HttpGet] public IEnumerable<string> Get() { return new string[] { "value1", "value2" }; } // GET api/values?name=dave [HttpGet] public string Get(string name) { return $"name is {name}"; } Here's what happens - Both http://localhost:65528/api/values and http://localhost:65528/api/values?name=dave cause the first Get() method to execute. This exact code works fine in Web Api 2. I know multiple ways of getting around this, but I don't know why it