O'Reilly logo

WCF 4.0 Multi-tier Services Development with LINQ to Entities by Mike Liu

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating the Data Model

To use LINQ to Entities we need to add a conceptual data model—an Entity Data Model or EDM—to the project. There are two ways to create the EDM: create from a database, or create manually. Here we will create the EDM from the Northwind database. We will add two tables and one view from the Northwind database into our project so that later on we can use them to demonstrate LINQ to Entities.

Adding a LINQ to Entities item to the project

To start with let us add a new item to our project: TestLINQToEntitiesApp. The new item added should be of the ADO.NET Entity Data Model type and named Northwind.edmx, as shown in the following Add New Item dialog window:

After you click on the Add button the Entity Data Model Wizard window ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required