Combining Entity Framework Self-Tracking, Extensible Metadata, and Data Annotations

Sunday, October 3, 2010

A few months ago, I read this great post about the Portable Extensible Metadata (PEM) of Entity Framework 4. The PEM relies on the extensibility of the entity framework EDM, which enables you to add your own XML content into the EDM. Once placed in the EDM, you can write code that investigates the MetadataWorkspace and do operations according to what you’ve written in the EDM. One usage for example which is demonstrated in the PEM extension is adding validations to entities and properties, and placing this validation information inside the EDM for later use. To let the...