concept Dynamic Data control in category .net

appears as: Dynamic Data controls
Entity Framework 4 in Action

This is an excerpt from Manning's book Entity Framework 4 in Action.

Figure 15.7. Dynamic Data controls are capable of displaying any mapped entity. As shown here, the display can be customized.

By default, the display template is inferred from the column’s type, but it can be specified too. Generally, you specify templates by creating a new class, specifically for this scenario, that extends the entity using the MetadataTypeAttribute attribute. Dynamic Data controls work with data annotations, a feature introduced in .NET Framework 3.5 SP1 and further enhanced in version 4. In this example, we’re using POCO entities, so the annotations are directly generated using the T4 engine (which was introduced in chapter 13). If you’re using the default entity-generation engine, you can use a partial class and the aforementioned MetadataTypeAttribute. More information on this topic is available from MSDN in the “MetadataTypeAttribute Class” article: http://mng.bz/q9hA.

Dynamic Data controls work with a special kind of project—the Dynamic Data Entities Web Application, which can be found with the other ASP.NET projects. You can see it highlighted in figure 15.6.

Figure 15.6. Dynamic Data Entities Web Application is the template project you need to select to start using Dynamic Data controls with Entity Framework. The other templates won’t work for this purpose.