Junior
ASP.NET Core
ASP.NET Core
What is the [ApiController] attribute and what benefits it brings?
The [ApiController] attribute is used to denote Web API controllers in
ASP.NET Core.
✅ Benefits:
- Automatic model validation
- Infer [FromBody] / [FromQuery], etc.
- 400 BadRequest returned automatically if model state is invalid.
- Improved parameter binding behavior
Share this Q&A
Share preview image: https://www.toolliyo.com/images/toolliyo-logo.png