The Web API tutorials are very small, with less core2.0, Microsoft offers a tutorial for the ASPNET Core2, and a tutorial on accessing SQL Server in EF core, which can be used to make the ASPNET core 2.0 with SQL Server API program.
The reference links are as follows:
1.aspnet Core 2.0 Web API Tutorials
Https://docs.microsoft.com/en-us/aspnet/core/tutorials/first-web-api
This tutorial uses a string array to do the data source without accessing the actual database
2. Building a new SQL database WebApp with entify Framework Core
Https://docs.microsoft.com/en-us/ef/core/get-started/aspnetcore/new-db
3. Entify Framework Core builds webapp to access existing SQL databases
Https://docs.microsoft.com/en-us/ef/core/get-started/aspnetcore/existing-db
Based on these tutorials, a simple makeover has been made for the Web API program to access the SQL Server. The experiment was successful.
adjourned
Using SQL Server in the ASP. CORE2.0 API