MetadataWorkspace 类

定义

运行时元数据工作区

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1506:AvoidExcessiveClassCoupling")]
public class MetadataWorkspace
type MetadataWorkspace = class
Public Class MetadataWorkspace
继承
MetadataWorkspace
属性

构造函数

MetadataWorkspace()

初始化 MetadataWorkspace 类的新实例。

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

MetadataWorkspace使用来自传统 EDMX 映射的所有项集合 (ItemCollection) 构造加载程序。 将使用默认的 o 空间和 o/c 映射集合。 首次使用给定集合时,会延迟执行项集合委托。 如果永远不会使用集合,则传递返回 null 的委托是可以接受的,但这很少这样做,并且 EF 在此类情况下使用该集合的任何尝试都将导致异常。

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

为 EF 所需的所有项集合 (ItemCollection) 构造加载MetadataWorkspace程序,o/c 映射除外,该映射将根据给定的 o-space 和 c 空间加载程序自动创建。 首次使用给定集合时,会延迟执行项集合委托。 如果永远不会使用集合,则传递返回 null 的委托是可以接受的,但这很少这样做,并且 EF 在此类情况下使用该集合的任何尝试都将导致异常。

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

使用指定的路径和程序集初始化 MetadataWorkspace 类的新实例。

属性

MaximumEdmVersionSupported

运行时将支持的最大 EDM 版本。

方法

ClearCache()

清除所有的元数据缓存条目。

CreateEntitySqlParser()

使用 EntitySqlParser 数据空间创建配置的 CSpace

CreateQueryCommandTree(DbExpression)

基于指定的查询表达式,创建新的 DbQueryCommandTree 限值到元数据工作区。

GetEdmSpaceType(EnumType)

返回一个 StructuralType 对象,该对象表示 EdmType 与参数 objectSpaceType 提供的类型匹配的 。

GetEdmSpaceType(StructuralType)

返回一个 StructuralType 对象,该对象表示 EdmType 与参数 objectSpaceType 提供的类型匹配的 。

GetEntityContainer(String, Boolean, DataSpace)

使用指定的实体容器名称和数据模型返回一个 EntityContainer 对象。

GetEntityContainer(String, DataSpace)

使用指定的实体容器名称和数据模型返回一个 EntityContainer 对象。

GetFunctions(String, String, DataSpace)

使用指定的名称、命名空间名称和数据模型返回所有函数重载。

GetFunctions(String, String, DataSpace, Boolean)

使用指定的名称、命名空间名称和数据模型返回所有函数重载。

GetItem<T>(String, Boolean, DataSpace)

使用指定的标识和数据模型返回一个项。

GetItem<T>(String, DataSpace)

使用指定的标识和数据模型返回一个项。

GetItemCollection(DataSpace)

获取 MetadataWorkspace 项。

GetItems(DataSpace)

获取指定数据模型中的所有项。

GetItems<T>(DataSpace)

获取指定数据模型中的所有项。

GetObjectSpaceType(EnumType)

返回一个 StructuralType 对象,该对象表示与参数 edmSpaceType 提供的类型匹配的对象空间类型。

GetObjectSpaceType(StructuralType)

返回一个 StructuralType 对象,该对象表示与参数 edmSpaceType 提供的类型匹配的对象空间类型。

GetPrimitiveTypes(DataSpace)

返回指定数据模型中的基元类型列表。

GetRelevantMembersForUpdate(EntitySetBase, EntityTypeBase, Boolean)

返回原始值在修改个体时需要的给定 EntitySet/ EntityType 的成员。

GetRequiredOriginalValueMembers(EntitySetBase, EntityTypeBase)
已过时.

从实体集和实体类型获取原始值成员。

GetType(String, String, Boolean, DataSpace)

使用指定的类型名称、命名空间名称和数据模型返回一个 EdmType 对象。

GetType(String, String, DataSpace)

使用指定的类型名称、命名空间名称和数据模型返回一个 EdmType 对象。

LoadFromAssembly(Assembly)

加载给定程序集中的元数据。

LoadFromAssembly(Assembly, Action<String>)

加载给定程序集中的元数据。

RegisterItemCollection(ItemCollection)
已过时.

在每个关联的数据模型中注册项集合。

TryGetEdmSpaceType(EnumType, EnumType)

通过 out 参数 edmSpaceType 返回一个 EnumType 对象,该对象表示 EdmType 与参数对象SpaceType 提供的类型匹配的 。

TryGetEdmSpaceType(StructuralType, StructuralType)

通过 out 参数 edmSpaceType 返回一个 StructuralType 对象,该对象表示 EdmType 与参数对象SpaceType 提供的类型匹配的 。

TryGetEntityContainer(String, Boolean, DataSpace, EntityContainer)

使用指定的实体容器名称和数据模型返回一个 EntityContainer 对象。

TryGetEntityContainer(String, DataSpace, EntityContainer)

使用指定的实体容器名称和数据模型返回一个 EntityContainer 对象。

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

使用指定的标识和数据模型返回一个项。

TryGetItem<T>(String, DataSpace, T)

使用指定的标识和数据模型返回一个项。

TryGetItemCollection(DataSpace, ItemCollection)

测试对 MetadataWorkspace 的检索。

TryGetObjectSpaceType(EnumType, EnumType)

通过 out 参数 objectSpaceType 返回一个 EnumType 对象,该对象表示与参数 edmSpaceType 提供的 匹配 EdmType 的类型。

TryGetObjectSpaceType(StructuralType, StructuralType)

通过 out 参数 objectSpaceType 返回一个 StructuralType 对象,该对象表示与参数 edmSpaceType 提供的 匹配 EdmType 的类型。

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

使用指定的类型名称、命名空间名称和数据模型返回一个 EdmType 对象。

TryGetType(String, String, DataSpace, EdmType)

使用指定的类型名称、命名空间名称和数据模型返回一个 EdmType 对象。

适用于