ASP. NET Core Webapi Getting Started (i)

Source: Internet
Author: User

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)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.