Controller
type inherits fromControllerBase
and have Views supportControllerBase
type is better suited for APIs
Further read:
https://learn.microsoft.com/en-us/aspnet/core/web-api/?view=aspnetcore-6.0
Controller
type inherits from ControllerBase
and have Views supportControllerBase
type is better suited for APIsFurther read:
https://learn.microsoft.com/en-us/aspnet/core/web-api/?view=aspnetcore-6.0
One Reply to “Difference between Controller and ControllerBase”