Using AJAX object with ASP.NET WEB API

Index

Attached Files

The following files have been attached to this tutorial:

.zip

c2-and-aspnet-template-project-for-vs-2013.zip

Download now 22.16 MB

Stats

2,567 visits, 8,075 views

Translations

This tutorial hasn't been translated.

Tools

Second pass: Creating our first Controller

Now we will crete our first Controller. To create a Controller you will:

1. Right click the Controllers folder, and choose Add > Controller...

2. Choose "Web API X Controller actions, using Entity Framework" and click Add

3. In the Model class field select the PlayerData class.

(If it is not listed in the list, please bild the project by clicking BUILD > Build Solution and star from pass 1 again)

4. In the Data context class field select the ApplicationDbContext class. It will generate the database for us.

5. Now, give a name to the controller in the Controller name field. Lests call it PlayerDataController. Notice that in ASP.NET all controller names need to end with ...Controller

6. Finally, click Add

  • 0 Comments

  • Order by
Want to leave a comment? Login or Register an account!