MetadataWorkspace MetadataWorkspace MetadataWorkspace MetadataWorkspace Class

定義

表示 ADO.NET 中繼資料執行階段服務元件,支援從不同的來源擷取中繼資料。Represents the ADO.NET metadata runtime service component that provides support for retrieving metadata from various sources.

public ref class MetadataWorkspace sealed
public sealed class MetadataWorkspace
type MetadataWorkspace = class
Public NotInheritable Class MetadataWorkspace
繼承
MetadataWorkspaceMetadataWorkspaceMetadataWorkspaceMetadataWorkspace

備註

MetadataWorkspace類別提供中央執行階段服務元件可供您與指定的應用程式的內容中的概念模型中繼資料互動。The MetadataWorkspace class provides a central runtime service component that you can use to interact with conceptual model metadata in the context of a given application. 如需詳細資訊,請參閱 < 中繼資料工作空間For more information, see Metadata Workspace.

建構函式

MetadataWorkspace() MetadataWorkspace() 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>) MetadataWorkspace(IEnumerable<String>, IEnumerable<Assembly>)

使用指定的路徑和組件,初始化 MetadataWorkspace 類別的新執行個體。Initializes a new instance of the MetadataWorkspace class using the specified paths and assemblies.

欄位

MaximumEdmVersionSupported MaximumEdmVersionSupported MaximumEdmVersionSupported MaximumEdmVersionSupported

表示實體架構執行階段所支援的最高實體資料模型 (EDM) 版本。Represents the maximum Entity Data Model (EDM) version supported by the Entity Framework runtime.

方法

ClearCache() ClearCache() ClearCache() ClearCache()

清除所有的中繼資料快取項目。Clears all the metadata cache entries.

CreateEntitySqlParser() CreateEntitySqlParser() CreateEntitySqlParser() CreateEntitySqlParser()

建立設定為使用 EntitySqlParser 資料空間的 CSpaceCreates an EntitySqlParser configured to use the CSpace data space.

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

建立新的 DbQueryCommandTree,它會根據指定的查詢運算式繫結至這個中繼資料工作區。Creates a new DbQueryCommandTree bound to this metadata workspace based on the specified query expression.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetEdmSpaceType(EnumType) GetEdmSpaceType(EnumType) GetEdmSpaceType(EnumType) GetEdmSpaceType(EnumType)

傳回 StructuralType 物件,這個物件表示符合參數 objectSpaceType 所提供型別的 EdmTypeReturns a StructuralType object that represents the EdmType that matches the type supplied by the parameter objectSpaceType.

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

傳回 StructuralType 物件,這個物件表示符合參數 objectSpaceType 所提供型別的 EdmTypeReturns a StructuralType object that represents the EdmType that matches the type supplied by the parameter objectSpaceType.

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

使用指定的實體容器名稱和資料模型,傳回 EntityContainer 物件。Returns an EntityContainer object by using the specified entity container name and the data model.

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

使用指定的實體容器名稱和資料模型,傳回 EntityContainer 物件。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) 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) GetFunctions(String, String, DataSpace, Boolean)

使用指定名稱、命名空間名稱和資料模型,傳回函式的所有多載。Returns all the overloads of the functions by using the specified name, namespace name, and data model.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(Inherited from Object)
GetItem<T>(String, Boolean, DataSpace) 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.

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

使用指定的識別和資料模型傳回項目。Returns an item by using the specified identity and the data model.

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

取得 MetadataWorkspace 項目。Gets MetadataWorkspace items.

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

取得指定之資料模型中的所有項目。Gets all the items in the specified data model.

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

取得指定之資料模型中的所有項目。Gets all the items in the specified data model.

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

傳回 StructuralType 物件,這個物件表示符合參數 edmSpaceType 所提供型別的物件空間型別。Returns a StructuralType object that represents the object space type that matches the type supplied by the parameter edmSpaceType.

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

傳回 StructuralType 物件,這個物件表示符合參數 edmSpaceType 所提供型別的物件空間型別。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) 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) GetRelevantMembersForUpdate(EntitySetBase, EntityTypeBase, Boolean)

傳回所指 EntitySet/EntityType 的成員,修改實體時需要這些成員的原始值。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) GetRequiredOriginalValueMembers(EntitySetBase, EntityTypeBase)

從實體集和實體型別取得原始值成員。Gets original value members from an entity set and entity type.

GetType() GetType() GetType() GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(Inherited from Object)
GetType(String, String, Boolean, DataSpace) GetType(String, String, Boolean, DataSpace) GetType(String, String, Boolean, DataSpace) GetType(String, String, Boolean, DataSpace)

使用指定的型別名稱、命名空間名稱和資料模型,傳回 EdmType 物件。Returns an EdmType object by using the specified type name, namespace name, and data model.

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

使用指定的型別名稱、命名空間名稱和資料模型,傳回 EdmType 物件。Returns an EdmType object by using the specified type name, namespace name, and data model.

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

從指定的組件載入中繼資料。Loads metadata from the given assembly.

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

從指定的組件載入中繼資料。Loads metadata from the given assembly.

MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

建立目前 Object 的淺層複製。Creates a shallow copy of the current Object.

(Inherited from Object)
RegisterItemCollection(ItemCollection) RegisterItemCollection(ItemCollection) RegisterItemCollection(ItemCollection) RegisterItemCollection(ItemCollection)

向每個相關聯的資料模型註冊項目集合。Registers the item collection with each associated data model.

ToString() ToString() ToString() ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(Inherited from Object)
TryGetEdmSpaceType(EnumType, EnumType) TryGetEdmSpaceType(EnumType, EnumType) TryGetEdmSpaceType(EnumType, EnumType) TryGetEdmSpaceType(EnumType, EnumType)

透過 out 參數 edmSpaceType 傳回 EnumType 物件,這個物件表示符合參數 objectSpaceType 所提供型別的 EdmTypeReturns a EnumType object via the out parameter edmSpaceType that represents the EdmType that matches the type supplied by the parameter objectSpaceType.

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

透過 out 參數 edmSpaceType 傳回 StructuralType 物件,這個物件表示符合參數 objectSpaceType 所提供型別的 EdmTypeReturns a StructuralType object via the out parameter edmSpaceType that represents the EdmType that matches the type supplied by the parameter objectSpaceType.

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

使用指定的實體容器名稱和資料模型,傳回 EntityContainer 物件。Returns an EntityContainer object by using the specified entity container name and the data model.

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

使用指定的實體容器名稱和資料模型,傳回 EntityContainer 物件。Returns an EntityContainer object by using the specified entity container name and the data model.

TryGetItem<T>(String, Boolean, DataSpace, T) 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.

TryGetItem<T>(String, DataSpace, T) 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.

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

測試擷取 MetadataWorkspaceTests the retrieval of MetadataWorkspace.

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

透過 out 參數 objectSpaceType 傳回 EnumType 物件,這個物件表示符合參數 edmSpaceType 所提供 EdmType 的型別。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) TryGetObjectSpaceType(StructuralType, StructuralType)

透過 out 參數 objectSpaceType 傳回 StructuralType 物件,這個物件表示符合參數 edmSpaceType 所提供 EdmType 的型別。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, Boolean, DataSpace, EdmType) TryGetType(String, String, Boolean, DataSpace, EdmType) TryGetType(String, String, Boolean, DataSpace, EdmType) TryGetType(String, String, Boolean, DataSpace, EdmType)

使用指定的型別名稱、命名空間名稱和資料模型,傳回 EdmType 物件。Returns an EdmType object by using the specified type name, namespace name, and data model.

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

使用指定的型別名稱、命名空間名稱和資料模型,傳回 EdmType 物件。Returns an EdmType object by using the specified type name, namespace name, and data model.

適用於