SALES: 1-800-867-1380

Work with data

Updated: July 16, 2014

In Microsoft Azure Mobile Services, data is stored in tables, which are maintained in the Microsoft Azure SQL Database that is associated with your mobile service. You can add one or more tables to your mobile service. In a JavaScript backend mobile service, click the Create button to add a new table. When using a .NET backend, your data model is defined in your mobile service project in Visual Studio.

Mobile Services simplifies the process of storing data in a SQL Database. When using a JavaScript backend, you don’t need to predefine the schema of tables in your database during development. Mobile Services automatically adds columns to a table based on the data you insert. To change this dynamic schema behavior, use the Dynamic Schema setting on the Configure tab.

To browse data, manage permissions and indexes on tables, or add server scripts, click on a table in the list. To delete a table, click to select a table row, and then click Delete.

Use the appropriate Mobile Services SDK (Windows Store C# / Windows Store JavaScript / Windows Phone / iOS / Android) for your platform to work with Mobile Services data in your app. For example, the following code inserts data into a table:

IMobileServiceTable<TodoItem> todoTable = App.MobileService.GetTable<TodoItem>();

await todoTable.InsertAsync(newItem);

[self.table insert:item completion:^(NSDictionary *result, NSError *error) {

    [(NSMutableArray *)items insertObject:result atIndex:[items count]];
    
    completion(index);
}];
mToDoTable.insert(item, new TableOperationCallback<ToDoItem>() {
    public void onCompleted(ToDoItem entity, Exception exception, ServiceFilterResponse response) {
        if (exception == null) {
            if (!entity.isComplete()) {
                mAdapter.add(entity);
            }
        } else {
            createAndShowDialog(exception, "Error");
        }
    }
});

For more information, see the tutorial Get started with data (Windows Store C# / Windows Store JavaScript / Windows Phone / iOS / Android / HTML).

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft