If you are more of a “behind-the-scenes” kind of developer though, you may prefer to make your SQL tables using good old SSMS and some scripts. In short 5+ minute video below, I walk you through the steps and gotchas around creating tables directly in SQL Azure, but consuming them via Windows Azure Mobile Services.
As for the gotchas, there are two that come to mind:
- Your tables must have a primary key column called “id”.
- Your table names should be “singular” (think “Category” not “Categories”) to allow for more appropriate class names on the client side. You wouldn’t want to create a class called “Categories” when it really represents a single category.
If you want a copy of the SQL script I use in the video blow, you can get it here: http://aka.ms/wcts