ASP.NET Web API 2 Hands-On
- 1.5 hours on-demand video
- 2 downloadable resources
- Full lifetime access
- Access on mobile and TV
- Certificate of Completion
Get your team access to Udemy's top 3,000+ courses anytime, anywhere.Try Udemy for Business
- Build RESTful web services with Web API 2
Create custom URIs with Attribute Routing
Save data persistently in a database with Entity Framework Code First migrations
- Use Attribute Routing to your advantage
- Use JQuery to create, read, update and delete objects with Web API 2
When you want to create a Web Service with Web API 2, you may find yourself in two different situations. You either want to build a new Web Application from scratch and use Web API 2 with that application, or you already have build a Web Application and add Web API 2 afterwards. In this lecture, we cover the first situation.
Web API uses the Model-View-Controller pattern. In this lecture, you will learn what this pattern actually means, and you will create your first model class in C#.
The controller implements the actual logic to a corresponding model. You learn to build your first controller in this lecture.
We want to use our new web service within a simple website. So we're going to add a new HTML page and install JQuery through the NuGet Package Manager to prepare our web application for the first web service call.
You're ready to start creating web applications with Web API 2. Congratulations! The next step is to save your data persistently in a database. Entity Framework enables you to do this. In this lecture, you will learn the first steps of how to use Web API with Entity Framework and look for changes on your objects in the database.
- Visual Studio 2015 Community Edition (free!)
- Other versions of Visual Studio also work, but might be slightly different
- You should have a little experience in building web applications in ASP.NET
- You should have a little experience in C#
- Experience with JQuery might help but is not absolutely necessary
- Google Chrome or Mozilla Firefox are best suited to see the results of our web service
In this course you will learn how to build a RESTful web service with ASP.NET Web API 2 and integrate it into an ASP.NET web application. You will use Visual Studio 2015 Community Edition, which is completely free. Whether you are new to web services or already have built a web service with the first release of Web API or any other framework doesn't matter, you will build your new service from the ground up. What you already should have is a little experience in C#. Having some knowledge in JQuery and building web applications in general might help, but is not absolutely necessary.
By the end of this course, you will be able to build a RESTful web service with Web API 2 by yourself, make GET, POST, PUT and DELETE HTTP Requests with JQuery and AJAX and use the new Attribute Routing of Web API 2 to control your REST web service design by creating custom URIs. You will also get a sneak peak at Entity Framework Code First migrations and learn how to save your data persistently in a database.
The only tools we will use in this course are Visual Studio 2015 Community Edition and Google Chrome. Both are available for download for free.
All source codes and exercise solutions of this course are also available for download, of course.
- This course is for students who want to use Web API 2 to build a RESTful web service for their web application
- It doesn't matter whether you already have built RESTful web services or you have no idea about web services at all. You will learn to build a web service with Web API 2 from the ground up and integrate it into an ASP.NET web application.