Dynamic Data - Pages can be displayed dynamically based on the data model without the need for physical pages. It does this by automatically discovering the linq to sql or entity framework data model at runtime and determining how to render the UI from the data model.
include:
ADO.NET Entity Framework
ADO.NET Data Services
Dynamic Data
Demo of dynamic data - Data-driven Web application takes the Products table as an example to demonstrate the application of dynamic data
introduce:
Using Northwind as a sample database to demonstrate Dynamic Data (dynamic data)
MetaModel - an abstraction for mapping between database and domain objects
MetaModel.RegisterContext() - registers the specified data context with the specified configuration context
Scaffold - Translated as scaffolding. That is, the mechanism to generate web page templates based on database architecture (linq to sql or entity framework)
ScaffoldTableAttribute(false) - Hide the specified table
ScaffoldColumn(false) - Hide the specified field
MetadataTypeAttribute(Type metadataClassType) - specifies the metadata class to associate with the data model class
DynamicField - displays the specified dynamic data field, equivalent to BoundField
DynamicControl - displays the specified dynamic data field through the specified field template
Expand