One, ASP. NET Core WebAPI
1. The current version is v1.1
2. The default route handling differs from the ASP. Webapi, which is now in the same way that the controller routes [route ("Api/menu")] and the request-way route [HttpGet], [HttpGet ("{ID}")] are used. Use method annotations directly on the Controller and action.
3. From the project structure dependency, the ASP. NET Core MVC project already contains the WEBAPI
Ii. creating an ASP. NET Core Webapi sample using Visual Studio 2017
1. Open vs 2017, new project, select . Net Core ASP.
2. Then select Webapi Template, click OK, Project creation complete
3. Run the WEBAPI program in a state without debugging enabled
4. The results of the operation are as follows:
5. Special Instructions
1.Core WEBAPI The default action returns JSON data
The Json data returned by the 2.Core Webapi is also handled by Newtonsoft.json serialization.
More:
JSON serialization processing in ASP.
. The use and arrangement of Efcore in Netcore (II.)-association Table query
Value transfer between ASP. NET Core MVC controller and view
ASP. NET Core Webapi Getting Started (i)