The MetadataContainer class aggregates metadata from specific item collections. Item collections reflect the different types of models in an application that uses the OpenAccess ORM. The following are the Item Collections that form the metadata model contents:
- PersistentTypes – this is a collection of MetaType objects which represent all the persistent classes associated with the database object that returns the MetadataContainer. This is the top level item collection that represents the conceptual layer of the metadata model. It is a list of types that are mapped to the corresponding artifacts like tables available in the relational store.
- Tables – list of tables that are available in the current container instance. During runtime the Tables collection contains both Tables and Views, because the Telerik OpenAccess ORM runtime threats them in the same way.
This is the main entry point for the relational layer of the metadata model.
- Views – list of views that are available in the current container instance. This collection is used only during design-time by OpenAccess. During runtime it stays empty as the views are handled in the same manner as the tables.
- Constraints – this is a collection of MetaConstraint items that describe the database foreign key constraints which connect the tables. If the information inside the current container instance is populated by an already mapped model, it will contain only the constraints that are involved in the actual model (not all that are available in the relational store).
- StoredProcedures - list of stored procedures that are available in the current container instance. If the information inside the current container instance is populated by an already mapped model, it will contain only the stored procedures that are auto-generated for CRUD operations related to the model (the reverse-mapped procedures are directly generated as static instances on a static class and they are not contained currently in the collection).
- Indexes – list of indexes that are available in the current container instance. If the information inside the current container instance is populated by an already mapped model, it will contain only the indexes that are involved in the actual model (not all that are available in the relational store).
- Interfaces - gets a list of persistent interfaces that can be implemented by some of the persistent types that are part of the current container instance.
- Structs - gets a list of persistent structs that can be referenced by some of the persistent types that are part of the current container instance.
- There is an additional collection as part of the MetadataContainer – the Schemas collection. It is a collection of the names of all database schemas that are part of the mapped database.
See Also