O'Reilly logo

Applied ASP.NET 4 in Context by Adam Freeman

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

The Entity Framework is an object-relational mapping (ORM) system that allows us to work with relational data using C# objects. What makes this possible is a data model, which uses C# classes to represent the tables and columns in the database.

Visual Studio contains a wizard that simplifies creating the data model and adding it to a project. We are going to build a model using the sample database included in the download that accompanies this book. This database is called TrainingData, and it is intended to track triathlon training data.

Follow these steps to create the data model:

  1. Create a new Visual Studio project using the ASP.NET Empty Web Application template, as shown in Figure 8-1. Name this project DataApp. ...

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