ASP.NET 5 is a new framework which is completely written from the scratch.ASP.NET 5 is an open source web framework for building modern web applications that can be developed and run on Windows, Linux and the Mac. In ASP.NET 5, the web forms, MVC and Web API framework is clubbed in to one framework.
In this tutorial, we will learn how to create a Web API using the ASP.NET MVC6 framework, then How to publish the Web API using the Visual Studio 2015 and finally we will learn how to host the published API in our local IIS.
Create a Web API Project:
In this sample, I’ll be creating an Web API project using ASP.NET MVC 6 . To create a new Web API application follow the below steps, Open the Visual Studio 2015, and then Click on file menu in the menu bar.
Click on New, then project, a new project Template will open.
Click on Web Template under the Visual C# (if you are going to use VB as a coding language, then choose Web Template under Visual Basic) on the right side.
Give the name of the project (here my project name is Employees.WebAPI) and choose the location where you want to store your application and the click OK.
On New ASP.NET Project window, Choose Web API under the ASP.NET 5 Template.