Using AJAX object with ASP.NET WEB API

2

Index

Stats

12,174 visits, 29,064 views

Tools

Translations

This tutorial hasn't been translated.

License

This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Published on 8 Dec, 2014. Last updated 12 Oct, 2020

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

  • 2 Comments

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