Creating a web service for the Northwind database
Unlike MVC controllers, Web API controllers do not call Razor views to return HTML responses for website visitors to see in browsers. Instead, they use content negotiation with the client application that made the HTTP request to return data in formats such as XML, JSON, or X-WWW-FORM-URLENCODED in their HTTP response.
X-WWW-FORM-URLENCODED format looks like the following example:
firstName=Mark&lastName=Price&jobtitle=Author
The client application must then deserialize the data from the negotiated format. The most used format for modern web services is JavaScript Object Notation (JSON) because it is compact and works natively with JavaScript in a browser when building Single-Page Applications (SPAs) with client-side technologies like Angular, React, and Vue.
One of the limitations of Minimal APIs compared to controller-based Web APIs is that Minimal APIs does not support content negotiation with the client, so clients must...