Example: Building a Windows Phone Application Using LINQ to SQL

While LINQ to SQL can be used in every aspect of .NET programming, it is particularly crucial in Windows Phone programming where creating a database on top of isolated storage depends on LINQ to SQL.

Let's return to Visual Studio and create a new Windows Phone application that creates a database of Books and their Publishers. Key to this exercise is that each book has a publisher, an object-oriented relationship that we want LINQ to SQL to map to the relational relationship in SQL Server (CE).

Let's begin by creating a new Windows Phone application. It is important to point out that you must have the Windows Phone 7.1 SDK or later installed, since LINQ to SQL was not included in ...

Get Programming Reactive Extensions and LINQ now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.