I'm familiar with FromBody and FromRoute. They seem to be clear.
I've used FromUri to handle multi-valued parameters mapping to a list or a string[].
FromQuery sounds similar, but is there any difference?
1 Answer
[FromQuery] attribute handles query parameters, i.e. key-value pairs coming after "?" in URI. [FromRoute] attribute handles route parameters coming before "?" in URI, i.e. path parameters.
For example, if you configured route "orders/{id}", then "id" is your route parameter, and if some actual request is like "orders/123?showHistory=true", then "showHistory" is your query parameter.
[FromUri] attribute in Web API works like [FromQuery] in ASP.NET Core MVC.