

Adding a ModelĪ model is an object that represents the data in your application. In general, you don't need to know ASP.NET MVC to use Web API. I'm using the Empty template for this tutorial because I want to show Web API without MVC. The Web API template uses ASP.NET MVC to provide API help pages. You can also create a Web API project using the "Web API" template. Under "Add folders and core references for", check Web API. In the New ASP.NET Project dialog, select the Empty template. Name the project "ProductsApp" and click OK. In the list of project templates, select ASP.NET Web Application. In the Templates pane, select Installed Templates and expand the Visual C# node. Or, from the File menu, select New and then Project. Start Visual Studio and select New Project from the Start page.

The front-end web page uses jQuery to display the results. In this tutorial, you will use ASP.NET Web API to create a web API that returns a list of products.

See Create a web API with ASP.NET Core and Visual Studio for Windows for a newer version of this tutorial. Almost any platform that you can think of has an HTTP library, so HTTP services can reach a broad range of clients, including browsers, mobile devices, and traditional desktop applications.ĪSP.NET Web API is a framework for building web APIs on top of the. HTTP is simple, flexible, and ubiquitous. HTTP is also a powerful platform for building APIs that expose services and data. HTTP is not just for serving up web pages.
