Confused with FromBody in ASP.NET Core

For anyone seeing this issue .net core 3 – you need to add the [ApiController] to the controller where you extend ControllerBase.
The [FromBody] is only needed if you’re doing an MVC controller.

This causes the body to get automatically processed in the way you’re expecting.

Microsoft documentation for the ApiController attribute

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)