Is there a way to accept anything in the query string of a route in .NET Core API 2.X? For example, if I were to pass the following to the same action, but with different query strings, I would receive a response containing the query string.
localhost:PORT/api/values/echo?something=2&somethingelse=testlocalhost:PORT/api/values/echo?word=hello-world
The response to the two requests would respectively be:
something=2&somethingelse=testword=hello-world
I thought the attempt below would work, but I was mistaken.
[HttpGet("echo")]
public IActionResult Echo(dynamic query)
{
return Ok(query);
}