Several New Features in Dynamic Data Preview 4
· Entity Templates
· Filters
· Support for inheritance in Entity Framework and Linq to SQL
· Support for many to many in Entity Framework
· Email and Url field templates
· Support for many new data annotation attributes
· Display
· Order – control order of fields
· AutoGenerateFilter - control if a field is used as a filter
· FilterUIHint – override default filter used for a field
· Ability to provide default values for fields at runtime
· Ability to use field templates and validation in Web pages hosted by any ASP.NET application.
· Requires no data model
· Requires no routing
· Datasource for accessing .NET RIA Domain Service and Dynamic Data support for .NET RIA Domain Service
DynamicDataSamples
This is the primary project sample that shows most of the new functionality that has been added to Dynamic Data since .NET 3.5 SP1. The default.aspx page highlights many of the new items that are being added in .NET 4, in particular:
· Filter Templates. Filters are now first class citizens in Dynamic Data. There is a new FilterTemplate directory that contains the default filter templates and supports user defined filter templates. Filters can be applied to columns using the new FilterUIHint attribute.
· Entity Templates – The Details, Edit and Insert page templates in version 1.0 forced a two column display style (field name, field value). Entity templates allow for the layout of an entity to be arbitrarily customized.
· Field Templates. The following new field templates have been created.
· Email Field Template. Data fields in the model that are marked with DataType(DataType.Email) will be displayed as mailto: hyperlinks that will launch the email client when clicked.
· Url Field Template. Fields in the model that are marked with DataType(DataType.Url) will be displayed as hyperlinks that will open a new window with the given URL.
· Many to Many Relationships in Tables. Entity Framework models support many to many relationships. Dynamic Data will display these as a list of values or in edit mode a list of checkboxes for the selectable columns.
· Enumeration on Model. If a column in the model is associated with an enumeration data type it will be displayed as a dropdown list of the values from the enumeration.
· Enumeration using Metadata. If a column in the model has an EnumDataType(typeof(enum)) attribute it associated with an enumeration data type it will be displayed as a dropdown list of the values from the enumeration.
· Inheritance. Both Entity Framework and Linq to SQL support inheritance relationships in their data models. Dynamic Data will now properly display this data.
This sample also shows some other advanced features in Dynamic Data such as
· Multiple Data Models
· Each data model uses a different data model technology.
· Each registers its own custom DynamicData directory.
Posted in: C# and .NET| Tags: NET CTP .NET 4.0 New Dynamic Data Control field data framework entity support filter order dynamic