Note: This project supports the Windows Store version of the Get started with data tutorial. For the Windows Phone Silverlight 8.0 version, see Get Started with Data in Azure Mobile Services for Windows Phone 8.

Introduction

This Windows Store sample application supports the Get started with data in Mobile Services tutorial in the Azure developer center. This tutorial shows you how to use Azure Mobile Services to leverage data in a Windows Store app. The app in this Window Store apps project initially stores inserted data in an in-memory collection. By following the tutorial, you replace the in-memory collection with Mobile Services for data storage and access.

Note: This tutorial is intended to help you better understand how Mobile Services enables you to use Microsoft Azure to store and retrieve data from a Windows Store app. As such, this topic walks you through many of the steps that are completed for you in the Mobile Services quickstart. If this is your first experience with Mobile Services, consider first completing the tutorial Get started with Mobile Services.

Prerequisites

This sample requires Visual Studio 2012 Express for Windows 8 apps to run on a Windows 8 computer.

Completing the project requires the following:

Building and running the initial sample

  1. In Visual Studio 2012 Express for Windows 8, open the sample solution GetStartedWithData.
  2. Press F5 to build and start this sample.
  3. Enter text in Insert a TodoItem and click Save.
    Added items appear as a checkbox item in a list in the second column, along with the assigned item ID.
  4. Stop debugging, and then press F5 to run the app again.
    Notice that the previously added items are no longer there, because they were only stored in memory.

Updating the app to leverage Mobile Services

To enable the app to leverage Mobile Services for cloud-based data storage instead of local or in-memory storage, complete the tutorial Get started with data in Mobile Services. This tutorial walks you through the following steps:

  1. Download this Windows app project
  2. Create the mobile service
  3. Add a data table for storage
  4. Update this app to use Mobile Services
  5. Test the app against the live mobile service

Once you have updated the app, it will use Mobile Services to store and retrieve data instead of using local or in-memory storage.

Running the app against Mobile Services

  1. Press F5 to start the app.
  2. Enter text in Insert a TodoItem and click Save.
  3. Stop debugging, and then press F5 to run the app again.
    Notice that the  previously added items are restored after the app loads.
  4. (Optional) Using an HTTP message inspection program, like Fiddler, repeat Step 2 and review the insert request sent to the mobile service, then click Refresh and again review the query request that is sent to the mobile service.

More Information

For more information about Mobile Services and to find the other tutorials, see the Mobile Services developer center.