语言

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>, Func<ObjectItemCollection>)

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

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

为来自传统 EDMX 映射的所有项集合(ItemCollection)构造一个MetadataWorkspace具有加载程序。 将使用默认 o-space 和 o/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, Boolean)

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

GetFunctions(String, String, DataSpace)

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

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, Action<String>)

从给定程序集加载元数据。

LoadFromAssembly(Assembly)

从给定程序集加载元数据。

RegisterItemCollection(ItemCollection)
已过时.

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

TryGetEdmSpaceType(EnumType, EnumType)

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

TryGetEdmSpaceType(StructuralType, StructuralType)

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

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 。

适用于