Book Image

Windows Phone 7.5 Data Cookbook

By : Ramesh Thalli
Book Image

Windows Phone 7.5 Data Cookbook

By: Ramesh Thalli

Overview of this book

Windows Phone 7.5 Mango contains support for apps written in Silverlight or XNA. These apps can store data on the device, and also load and manipulate data from "the cloud" and other web services.This Windows Phone 7.5 Data Cookbook has a range of recipes to help you apply data handling concepts. You will be able to apply the knowledge gained from these recipes to build your own apps effectively. This Windows Phone 7.5 Data Cookbook starts with data binding concepts at the UI layer and then shows different ways of saving data locally and externally in databases. The book ends with a look at the popular MVVM software design pattern. The recipes contained in this book will make you an expert in the areas of data access and storage.
Table of Contents (15 chapters)
Windows Phone 7.5 Data Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Consuming OData services


This recipe demonstrates how to access OData using a simple URI. For this recipe, we will use the DataSvcUtil to generate the proxy classes instead of adding a reference.

Getting ready

For this sample, we will be using an OData API exposed by Netflix, an online movie rental company. At the time of writing the book, this service was in preview mode; please refer to the online documentation for the latest changes:

  1. Using your browser you can navigate to http://developer.netflix.com/docs/oData_Catalog to find all the documentation about the OData API.

  2. You can browse OData using http://odata.netflix.com/catalog/. We will be using this link to consume the data in this recipe.

  3. There are several features available for us to consume the data. At the resource level, we can get Catalog Titles (Catalog/Titles), People (Catalog/People), Languages (Catalog/Languages), and Genres (Catalog/Genres).

  4. We can use $filter to get the lowest rated titles available to watch instantly or the highest...