ASP.NET Core 3.0 - 未推断出模型绑定?

ASP.NET Core 3.0 - Model Binding not inferred?

根据文档,复杂类型应自动处理为 "FromBody",无需使用属性修饰参数。无论出于何种原因,它都不适合我。我错过了什么?谢谢

ASP.NET核心3,Header的Content Type为"application/json".

来自Microsoft documentation

The [ApiController] attribute applies inference rules for the default data sources of action parameters. These rules save you from having to identify binding sources manually by applying attributes to the action parameters.

当您在控制器上使用 [ApiController] 属性时,复杂类型可以自动处理为 "FromBody"。