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 basic requirements for a HTTP REST API.
I don't require any Razor view engine, Javascript or HTML inclusions.
How can I create a project without all the unwanted extras, which I usually remove in the past?
Thank you.
For this, open Visual Studio and click on File menu and click on New Project. This will open New Project popup as below. In the New Project popup, expand Visual C# and select Web node in the left pane. Select ASP.NET Web Application template in the middle pane and enter the name of a project and click OK.
Select the Visual C# | Web project type from the project type tree view, then select the ASP.NET MVC 4 Web Application project type. Set the project's Name to ContactManager and the Solution name to Begin, then click OK. In the ASP.NET MVC 4 project type dialog, select the Web API project type. Click OK.
It's all in the template you select.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With