O'Reilly logo

Microsoft Visual Studio 2015 Unleashed, Third Edition by Mike Snell, Lars Powers

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating the Services (Controller)

We will start with an example of coding the service from scratch. For starters, we are going to add a controller class to the project we’ve been working with. The following walks you through this process:

1. Right-click the Controllers folder and choose Add, New Item. From the Add New Item dialog, select Web API Controller Class. Figure 19.5 shows an example. Notice the left side of the dialog that ASP.NET 5 is selected.

Image

FIGURE 19.5 Select Web API Controller Class from the Add New Item dialog.

2. Name the file CustomerController and click the Add button.

Visual Studio will then create a controller class on ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required