Simple WEB API REST Project

后端 未结 4 1063
天命终不由人
天命终不由人 2021-02-02 12:06

What is the best way to create a simple REST API in Visual Studio 2013 using ASP.NET MVC.

I just want something with controllers and route config along with any other ba

4条回答
  •  时光说笑
    2021-02-02 12:34

    It's all in the template you select.

    1. In the New Project dialog, select ".NET Framework 4.5" if not already selected
    2. Navigate to Installed > Templates > Visual C# > Web, then "ASP.NET Web Application" and select OK.
    3. On the dialog to select the project type, select "Empty", but then be sure to check "Web API" under "Add folders and core references.

    Now you'll have the bare minimums created.

    See: http://www.asp.net/web-api/overview/getting-started-with-aspnet-web-api/tutorial-your-first-web-api

提交回复
热议问题