Adding the Data Model

The first thing to add in the Web project is the data source. This can be of different kinds, for example both LINQ to SQL classes and Entity Data Models are supported. The example will be based on the Entity Framework so you also see a new control in ASP.NET 4.0, thus add a new entity data model named Northwind.edmx and add to the model the Orders table from the database. Such steps have been described a lot of times in this book, (see Chapter 27, “Introducing the ADO.NET Entity Framework” for a full discussion) so we will not show them again in detail. When you have the data, you need a place for presenting and editing the data, so you need a new Web Form.

Get Visual Basic® 2010 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.