While studying for 70-486 I’ve found a couple of useful resources for studying Web API. Before listing each one, it’s worth pointing out that this is before the March 2014 refresh of the exams.
If you have little programming experience, I recommend you follow them in this order as they get more complicated as the list goes on. If however, you’re already comfortable with MVC and Entity Framework you can probably skip to the penultimate or even last option.
Microsoft Virtual Academy
The whole 70-486 Jump Start is definitely worth investing your time in. Obviously there’s no actual tutorial with this, but it’s a great starting point.
Build RESTful API’s with ASP.NET Web API
This is a nice and quick introduction to Web API that will not only get you up and running with Web API, but also a simple client to consume the service. Importantly, the code on the site works as is and is easy to follow.
- Very easy to follow
- Introduces Service Layer/Repository pattern
- HTTP PUT and POST
- Shows how to capture JSON in IE! (I admit never knew this)
- You build a simple client
- Brief debugging in Visual Studio
- Publish the example to Azure (I didn’t try this)
- Download a 100+MB file for code snippets (which you don’t technically need)
Using Web API with Entity Framework
Although this is a 7 part tutorial of Web API with EF it’s not 7 times larger! It has the added bonus of introducing another part of the exam, Entity Framework, but nothing beyond the very basics. Again, you construct a client to consume the service, but this time with a little more detail.
- Uses EF, so if you’re not familiar with that you get exposure and if you are, it’s a slightly more “realistic” tutorial
- More involved Client UI
- Uses Knockout.js (the MVC template I used has 2.2.0 installed so pay attention to version numbers)
- Authentication, albeit the installed MVC template forms authentication (blink and you’ll miss the credentials)
- 3 technologies (Web API, Knockout.js and Entity Framework) covered so a lot to pick up
- starts slow, but gets quick quite rapidly, e.g. part 7 (hint: you can login as “Administrator” on the homepage)
Detailed Tutorial for Building ASP.Net Web API RESTful Service
As the name suggests, this is a more detailed tutorial of Web API than the other resources and although it’s well done, I wouldn’t recommend you start off with this one if you’re a beginner.
- Covers Entity Framework, Dependency Injection and the Repository pattern so more “real-life”
- HTTP POST, PUT and DELETE
- Full source code on Github
- May have been me, but I think some bits have been missed as I had to refer to the code a couple of times to get things going
- Doesn’t explain using Fiddler (and why should it, so make sure you’re happy with either Fiddler or some equivalent like F12)
- Isn’t finished so no caching.
If you want a quick overview of Web API in preparation for 70-486, the above 4 resources should get you well on your way. I haven’t taken the exam yet, so who knows if it was worth the effort, but for those familiar with WCF, Web API appears to be very nice.