Getting Started with JSON APIs in ASP.NET
Explore how to set up JSON Web APIs in ASP.NET Core by creating API controllers with the [ApiController] attribute, customizing routing, and injecting database context. Understand the differences from MVC controllers and prepare to implement CRUD operations in future lessons.
We'll cover the following...
We'll cover the following...
To enable JSON Web APIs, you have to create a new controller class in your controller’s folder. It is preferred to place these controllers inside a folder called Api, which sits inside your controller’s folder. This controller class requires the attribute [ApiController] for the framework to figure out that this class will be used for JSON API ...