As part of producing, more opinionated APIs via ApiControllerAttribute we can assume any complex type parameter in your action without binding information is interpreted as FromBody. This will reduce the amount of typing \ clutter in user code:
```C#
[ApiController]
public class OrdersController
{
// ...
[HttpPost]
public IActionResult Create(Book book); // Assumes FromBody
[HttpPut]
public IActionResult Update([FromQuery] Book book); // Opt out
}
```
We could add a switch to ApiControllerOptions to disable this behavior globally.
The proposal here is to do:
[FromBody] by default[FromRoute] by default[FromQuery] by defaultWe think this is the most reasonable possible convention we could have and guides you towards good practices.
No one has raised a significant objection to this so we're going to start working on it 馃憤
Most helpful comment
The proposal here is to do:
[FromBody]by default[FromRoute]by default[FromQuery]by defaultWe think this is the most reasonable possible convention we could have and guides you towards good practices.