ADO.NET Entity Framework : Querying metadata
A few months ago I posted several articles about the ADO.NET Entity Framework beta 3. In the meanwhile the Entity Framework has been officially released and a lot of resources about this technology have become available.
The last few weeks I have been taking a closer look at the metadata services of the ADO.NET Entity Framework. It is not so easy to comprehend all the metadata concepts (EntityTypes, EntitySets, EdmTypes, EdmMembers, EdmProperties, NavigationProperties, …) of the three models in the Entity Framework. Besides it seems that there are almost no useful examples available on the internet.
That is why I have posted an article with 20 examples which use LINQ to query the metadata collections of the ADO.NET Entity Framework. These queries can be used to examine the structure of your Entity Data Model or to get statistics about it.
This is the table of contents of the article which is posted on my website:
- Conceptual schema: MetadataWorkspace.GetItems
- Conceptual schema: MetadataWorkspace.GetEntityContainer
- Conceptual schema: ObjectQuery.GetResultType
- ToMetadata() extension method
- Storage schema: MetadataWorkspace.GetItems
- Storage schema: EntityStoreSchemaGenerator.CreateStoreSchemaConnection