Skip to Main Content
ASP.NET 4 24-Hour Trainer
book

ASP.NET 4 24-Hour Trainer

by Toi B. Wright
July 2010
Beginner content levelBeginner
552 pages
10h 14m
English
Wrox
Content preview from ASP.NET 4 24-Hour Trainer

Chapter 18. Using the ADO.NET Entity Framework

Most web applications are used to collect, manipulate and share information. To do that, they need a way to manage data easily. The ADO.NET Entity Framework is Microsoft's recommended data access technology. With the ADO.NET Entity Framework your application uses a conceptual data model, called the Entity Data Model, to manage the data. In this lesson I show you how to create an Entity Data Model (EDM) and how to manage data using the EDM.

In this lesson I use a simple SQL Server database with the following four tables:

  • Category Table — Contains the categories for the recipes.

  • Recipe Table — Contains the recipes.

  • Ingredients Table — Contains the ingredients for each recipe.

  • Tools Table — Contains the tools for each recipe.

Figure 18-1 shows the database diagram for the database.

FIGURE 18-1

Figure 18.1. FIGURE 18-1

CREATING A SQL SERVER DATABASE

In this lesson I show you how to use the Entity Data Model Wizard to create an Entity Data Model from an existing database. However, if the database does not exist, you can create it from within the Microsoft Visual Web Developer 2010 Express IDE by following these steps:

  1. Create an App_Data folder, if your application does not already have one. To create an App_Data folder, right-click the name of your project on the Solution Explorer window and select Add

  2. Create the SQL Server database. To create a SQL Server database, ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

ASP.NET 4 24-Hour Trainer

ASP.NET 4 24-Hour Trainer

Toi B. Wright
ASP.NET 4 Unleashed

ASP.NET 4 Unleashed

Stephen Walther, Kevin Hoffman, Nate Dudek

Publisher Resources

ISBN: 9780470596913Purchase bookExamplesErrata