TechEd India Data: Exposing Azure Mobile Services through Web API

For those who attended my session at TechEd India 2013, one of the topics I presented was, on Azure Mobile Services.  I also presented on new enhancements to ASP.NET with the Visual Studio 2012 Fall Update. 

As a mixture of both the sessions, I mentioned about building a Web API feed for Tech Ed Data that could be consumed through Azure Mobile Services.

If you are new to Azure Mobile Services, you can read up about from

Azure Mobile Services is best consumed through client apps such as Windows 8, iOS and Android Apps.  Recently, we also launched the HTML5 Apps template for Azure Mobile Services and CORS Support.

However, if you would like to use this in a ASP.NET Application, particularly, Web API, there are a few hops to make.

I decided to expose TechEd India data (Speakers, Schedule, Sessions, Tracks and Sponsors data) as an Azure Mobile Services.  That was good for me to build a Windows 8 App.

When I wanted to expose this in Web API, I had to do couple of things

1. Create Client Classes for each of the Mobile Service Tables. 

2. Create a Web API Controller for each of these classes which would make a HTTPClient request to the Azure Mobile Services.

I found this article handy

I pretty much created an API Controller each for Speakers, Tracks, Sessions, SessionsBySpeaker etc.,

Note that, in Azure Mobile Services, these are dummy tables that build upon the original tables to query a JOIN between related tables.

Finally, once you create the API Controllers for each of these classes, I hosted the app on Azure so that it can be consumed as JSon Data.  Note that, if you enable “Read” access for Everyone in the Permissions tab for Azure Mobile Service Table, you can achieve the same functionality.  However, Web API allows you to, a. add a logical layer between Mobile Service and Client Apps.  b. It also allows you to expose OData Queries on top of the Data.  I have provided the currently available URLs. Requesting them should provide you jSon Data.  Hope you find it useful.




Track Sessions:  

You could do a OData Query on this, for example,$top=1

As of now I have only exposed the GET Methods.  In future, I would refine it to allow all operations.

I don’t know how long I would be able to host this service.  Till then, enjoy!


Print | posted on Sunday, April 7, 2013 8:58 PM

Comments on this post

# re: TechEd India Data: Exposing Azure Mobile Services through Web API

Requesting Gravatar...
If you want a greener floor, you'll want to choose something that has the smallest carbon footprint possible. - Larry Starr Sarasota
Left by chantal2013 on Jan 30, 2014 3:49 AM

# Awesome post

Requesting Gravatar...
Haven't any expression to like this post… ..Really i am inspired from this post… .the individual who make this post it was an incredible human..thanks for imparted this with us. Web Design Company in Delhi
Left by jeremywilliams on Apr 25, 2014 4:42 PM

# re: TechEd India Data: Exposing Azure Mobile Services through Web API

Requesting Gravatar...
Your post was good and the information that you giving your post that was really valuable. I will share with my friends. Paytm Coupons
Left by rayon on Dec 01, 2014 4:25 PM

# re: TechEd India Data: Exposing Azure Mobile Services through Web API

Requesting Gravatar...
Not exactly new to Azure, but I am to the mobile services, had enough issues with it, so I switched to uTorrent which is faster, anyway, this looks like it'll work.
Left by Rodger on Dec 04, 2014 1:19 AM


Requesting Gravatar...
Great informative site I'm really impressed after reading this blog post. I really appreciate the time and effort you spend to share this with us! I do hope to read more updates from you.
Left by on Nov 22, 2015 1:02 AM

Your comment:

 (will show your gravatar)