Chapter 21A. Dynamic Data in Web Forms
Dynamic Data is a framework that enables you to create a fully functional data-driven web application in only five minutes. In the previous lessons I have shown you how to extend the simple sample application that Microsoft Visual Web Developer 2010 Express creates when you use the ASP.NET Web Application template. In this lesson I show you how to create a data-driven application that uses the Dynamic Data framework.
Microsoft Visual Web Developer 2010 Express provides two different templates for creating applications that use Dynamic Data:
ASP.NET Dynamic Data Entities Web Application — This template uses an Entity Data Model to access the data.
ASP.NET Dynamic Data Linq to SQL Web Application — This template uses LINQ to SQL to access the data.
THE DYNAMIC DATA ENTITIES WEB APPLICATION TEMPLATE
In this lesson I use the ASP.NET Dynamic Data Entities Web Application template. Unlike with the other templates that I have demonstrated in this book, you cannot immediately run a new web application that uses the Dynamic Data framework. Instead, you must do two things before the application can run:
Add an Entity Data Model.
Update the
Global.asax
file.
Figure 21A-1 shows the Entity Data Model (EDM) that I use in this lesson. This is the same model I used in Lesson 20A.
Figure 21A.1. FIGURE 21A-1
The namespace for the EDM is Models and the entity container is ...
Get ASP.NET 4 24-Hour Trainer 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.