AspNet core web Api usage of ApiControllerAttribute
问题 When I create a new controller in the API project, it generates a controller class with [ApiController] attribute, like this: [ApiController] public class TestController : ControllerBase { //implementation } I've seen a few webapi projects where usage of this attribute is omitted. Microsoft documentation here says: Indicates that a type and all derived types are used to serve HTTP API responses. The presence of this attribute can be used to target conventions, filters and other behaviors