Overview — REST APIs with ASP.NET Core API
In Chapter 3, Creating a Web Server with ASP.NET Core, you saw how to create a basic ASP.NET Core MVC application that can be broken down into three layers: models, controllers, and views. RESTful APIs in ASP.NET Core work very similarly; the only difference is that, instead of returning responses as visual views, the API response is a payload of data (usually in JSON format). The data returned from the API is later consumed by clients, such as Angular-based applications that can render the data as views, or by headless clients that have no UI and simply process data. (More information on headless clients can be found at https://en.wikipedia.org/wiki/Headless_software.) For example, consider a background process that periodically sends notifications to a user about their account status:
Before ASP.NET Core, Microsoft created an explicit distinction between ASP.NET MVC and the ASP.NET Web API. The former was used to create web applications with views...