MetadataWorkspace MetadataWorkspace MetadataWorkspace Class

Definition

Runtime Metadata Workspace

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1506:AvoidExcessiveClassCoupling")]
public class MetadataWorkspace
type MetadataWorkspace = class
Public Class MetadataWorkspace
Inheritance
MetadataWorkspaceMetadataWorkspaceMetadataWorkspace
Attributes

Constructors

MetadataWorkspace() MetadataWorkspace() MetadataWorkspace()

Initializes a new instance of the MetadataWorkspace class.

MetadataWorkspace(IEnumerable<String>, IEnumerable<Assembly>) MetadataWorkspace(IEnumerable<String>, IEnumerable<Assembly>) MetadataWorkspace(IEnumerable<String>, IEnumerable<Assembly>)

Initializes a new instance of the MetadataWorkspace class using the specified paths and assemblies.

MetadataWorkspace(Func<EdmItemCollection>, Func<StoreItemCollection>, Func<StorageMappingItemCollection>) MetadataWorkspace(Func<EdmItemCollection>, Func<StoreItemCollection>, Func<StorageMappingItemCollection>) MetadataWorkspace(Func<EdmItemCollection>, Func<StoreItemCollection>, Func<StorageMappingItemCollection>)

Constructs a MetadataWorkspace with loaders for all item collections (ItemCollection) that come from traditional EDMX mapping. Default o-space and o/c mapping collections will be used. The item collection delegates are executed lazily when a given collection is used for the first time. It is acceptable to pass a delegate that returns null if the collection will never be used, but this is rarely done, and any attempt by EF to use the collection in such cases will result in an exception.

MetadataWorkspace(Func<EdmItemCollection>, Func<StoreItemCollection>, Func<StorageMappingItemCollection>, Func<ObjectItemCollection>) MetadataWorkspace(Func<EdmItemCollection>, Func<StoreItemCollection>, Func<StorageMappingItemCollection>, Func<ObjectItemCollection>) MetadataWorkspace(Func<EdmItemCollection>, Func<StoreItemCollection>, Func<StorageMappingItemCollection>, Func<ObjectItemCollection>)

Constructs a MetadataWorkspace with loaders for all item collections (ItemCollection) needed by EF except the o/c mapping which will be created automatically based on the given o-space and c-space loaders. The item collection delegates are executed lazily when a given collection is used for the first time. It is acceptable to pass a delegate that returns null if the collection will never be used, but this is rarely done, and any attempt by EF to use the collection in such cases will result in an exception.

Properties

MaximumEdmVersionSupported MaximumEdmVersionSupported MaximumEdmVersionSupported

The Max EDM version thats going to be supported by the runtime.

Methods

ClearCache() ClearCache() ClearCache()

Clears all the metadata cache entries.

CreateEntitySqlParser() CreateEntitySqlParser() CreateEntitySqlParser()

Creates an EntitySqlParser configured to use the CSpace data space.

CreateQueryCommandTree(DbExpression) CreateQueryCommandTree(DbExpression) CreateQueryCommandTree(DbExpression)

Creates a new DbQueryCommandTree bound to this metadata workspace based on the specified query expression.

GetEdmSpaceType(StructuralType) GetEdmSpaceType(StructuralType) GetEdmSpaceType(StructuralType)

Returns a StructuralType object that represents the EdmType that matches the type supplied by the parameter objectSpaceType .

GetEdmSpaceType(EnumType) GetEdmSpaceType(EnumType) GetEdmSpaceType(EnumType)

Returns a StructuralType object that represents the EdmType that matches the type supplied by the parameter objectSpaceType .

GetEntityContainer(String, DataSpace) GetEntityContainer(String, DataSpace) GetEntityContainer(String, DataSpace)

Returns an EntityContainer object by using the specified entity container name and the data model.

GetEntityContainer(String, Boolean, DataSpace) GetEntityContainer(String, Boolean, DataSpace) GetEntityContainer(String, Boolean, DataSpace)

Returns an EntityContainer object by using the specified entity container name and the data model.

GetFunctions(String, String, DataSpace) GetFunctions(String, String, DataSpace) GetFunctions(String, String, DataSpace)

Returns all the overloads of the functions by using the specified name, namespace name, and data model.

GetFunctions(String, String, DataSpace, Boolean) GetFunctions(String, String, DataSpace, Boolean) GetFunctions(String, String, DataSpace, Boolean)

Returns all the overloads of the functions by using the specified name, namespace name, and data model.

GetItem<T>(String, DataSpace) GetItem<T>(String, DataSpace) GetItem<T>(String, DataSpace)

Returns an item by using the specified identity and the data model.

GetItem<T>(String, Boolean, DataSpace) GetItem<T>(String, Boolean, DataSpace) GetItem<T>(String, Boolean, DataSpace)

Returns an item by using the specified identity and the data model.

GetItemCollection(DataSpace) GetItemCollection(DataSpace) GetItemCollection(DataSpace)

Gets MetadataWorkspace items.

GetItems(DataSpace) GetItems(DataSpace) GetItems(DataSpace)

Gets all the items in the specified data model.

GetItems<T>(DataSpace) GetItems<T>(DataSpace) GetItems<T>(DataSpace)

Gets all the items in the specified data model.

GetObjectSpaceType(StructuralType) GetObjectSpaceType(StructuralType) GetObjectSpaceType(StructuralType)

Returns a StructuralType object that represents the object space type that matches the type supplied by the parameter edmSpaceType .

GetObjectSpaceType(EnumType) GetObjectSpaceType(EnumType) GetObjectSpaceType(EnumType)

Returns a StructuralType object that represents the object space type that matches the type supplied by the parameter edmSpaceType .

GetPrimitiveTypes(DataSpace) GetPrimitiveTypes(DataSpace) GetPrimitiveTypes(DataSpace)

Returns the list of primitive types in the specified data model.

GetRelevantMembersForUpdate(EntitySetBase, EntityTypeBase, Boolean) GetRelevantMembersForUpdate(EntitySetBase, EntityTypeBase, Boolean) GetRelevantMembersForUpdate(EntitySetBase, EntityTypeBase, Boolean)

Returns members of a given EntitySet/ EntityType for which original values are needed when modifying an entity.

GetRequiredOriginalValueMembers(EntitySetBase, EntityTypeBase) GetRequiredOriginalValueMembers(EntitySetBase, EntityTypeBase) GetRequiredOriginalValueMembers(EntitySetBase, EntityTypeBase)

Gets original value members from an entity set and entity type.

GetType(String, String, DataSpace) GetType(String, String, DataSpace) GetType(String, String, DataSpace)

Returns an EdmType object by using the specified type name, namespace name, and data model.

GetType(String, String, Boolean, DataSpace) GetType(String, String, Boolean, DataSpace) GetType(String, String, Boolean, DataSpace)

Returns an EdmType object by using the specified type name, namespace name, and data model.

LoadFromAssembly(Assembly) LoadFromAssembly(Assembly) LoadFromAssembly(Assembly)

Loads metadata from the given assembly.

LoadFromAssembly(Assembly, Action<String>) LoadFromAssembly(Assembly, Action<String>) LoadFromAssembly(Assembly, Action<String>)

Loads metadata from the given assembly.

RegisterItemCollection(ItemCollection) RegisterItemCollection(ItemCollection) RegisterItemCollection(ItemCollection)

Registers the item collection with each associated data model.

TryGetEdmSpaceType(StructuralType, StructuralType) TryGetEdmSpaceType(StructuralType, StructuralType) TryGetEdmSpaceType(StructuralType, StructuralType)

Returns a StructuralType object via the out parameter edmSpaceType that represents the EdmType that matches the type supplied by the parameter objectSpaceType .

TryGetEdmSpaceType(EnumType, EnumType) TryGetEdmSpaceType(EnumType, EnumType) TryGetEdmSpaceType(EnumType, EnumType)

Returns a EnumType object via the out parameter edmSpaceType that represents the EdmType that matches the type supplied by the parameter objectSpaceType .

TryGetEntityContainer(String, DataSpace, EntityContainer) TryGetEntityContainer(String, DataSpace, EntityContainer) TryGetEntityContainer(String, DataSpace, EntityContainer)

Returns an EntityContainer object by using the specified entity container name and the data model.

TryGetEntityContainer(String, Boolean, DataSpace, EntityContainer) TryGetEntityContainer(String, Boolean, DataSpace, EntityContainer) TryGetEntityContainer(String, Boolean, DataSpace, EntityContainer)

Returns an EntityContainer object by using the specified entity container name and the data model.

TryGetItem<T>(String, DataSpace, T) TryGetItem<T>(String, DataSpace, T) TryGetItem<T>(String, DataSpace, T)

Returns an item by using the specified identity and the data model.

TryGetItem<T>(String, Boolean, DataSpace, T) TryGetItem<T>(String, Boolean, DataSpace, T) TryGetItem<T>(String, Boolean, DataSpace, T)

Returns an item by using the specified identity and the data model.

TryGetItemCollection(DataSpace, ItemCollection) TryGetItemCollection(DataSpace, ItemCollection) TryGetItemCollection(DataSpace, ItemCollection)

Tests the retrieval of MetadataWorkspace.

TryGetObjectSpaceType(EnumType, EnumType) TryGetObjectSpaceType(EnumType, EnumType) TryGetObjectSpaceType(EnumType, EnumType)

Returns a EnumType object via the out parameter objectSpaceType that represents the type that matches the EdmType supplied by the parameter edmSpaceType .

TryGetObjectSpaceType(StructuralType, StructuralType) TryGetObjectSpaceType(StructuralType, StructuralType) TryGetObjectSpaceType(StructuralType, StructuralType)

Returns a StructuralType object via the out parameter objectSpaceType that represents the type that matches the EdmType supplied by the parameter edmSpaceType .

TryGetType(String, String, DataSpace, EdmType) TryGetType(String, String, DataSpace, EdmType) TryGetType(String, String, DataSpace, EdmType)

Returns an EdmType object by using the specified type name, namespace name, and data model.

TryGetType(String, String, Boolean, DataSpace, EdmType) TryGetType(String, String, Boolean, DataSpace, EdmType) TryGetType(String, String, Boolean, DataSpace, EdmType)

Returns an EdmType object by using the specified type name, namespace name, and data model.

Applies to