语言

RuntimeModelConvention 类

定义

创建可变模型的优化副本的约定。 此约定通常由数据库提供程序实现,用于在创建只读模型时更新提供程序批注。

[System.Runtime.CompilerServices.Nullable(0)]
public class RuntimeModelConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IModelFinalizedConvention
public class RuntimeModelConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IModelFinalizedConvention
[<System.Runtime.CompilerServices.Nullable(0)>]
type RuntimeModelConvention = class
    interface IModelFinalizedConvention
    interface IConvention
type RuntimeModelConvention = class
    interface IModelFinalizedConvention
    interface IConvention
Public Class RuntimeModelConvention
Implements IModelFinalizedConvention
继承
RuntimeModelConvention
派生
特性
实现

注解

有关详细信息和示例,请参阅 模型生成约定 。

构造函数

名称 说明
RuntimeModelConvention(ProviderConventionSetBuilderDependencies)

创建 RuntimeModelConvention的新实例。

属性

名称 说明
Dependencies

此服务的依赖项。

方法

名称 说明
Create(IModel)

基于提供的模型创建优化模型。

GetForeignKey(IForeignKey, RuntimeEntityType)

获取读取优化模型中的相应外键。

GetIndex(IIndex, RuntimeEntityType)

获取读取优化模型中的相应索引。

GetKey(IKey, RuntimeEntityType)

获取读取优化模型中的相应键。

ProcessComplexPropertyAnnotations(Dictionary<String,Object>, IComplexProperty, RuntimeComplexProperty, Boolean)

更新将在只读对象上设置的属性批注。

ProcessComplexTypeAnnotations(Dictionary<String,Object>, IComplexType, RuntimeComplexType, Boolean)

更新将在只读对象上设置的复杂类型批注。

ProcessElementTypeAnnotations(Dictionary<String,Object>, IElementType, RuntimeElementType, Boolean)

更新将在只读对象上设置的元素类型批注。

ProcessEntityTypeAnnotations(Dictionary<String,Object>, IEntityType, RuntimeEntityType, Boolean)

更新将在只读对象上设置的实体类型批注。

ProcessEntityTypeAnnotations(IDictionary<String,Object>, IEntityType, RuntimeEntityType, Boolean)

更新将在只读对象上设置的实体类型批注。

ProcessForeignKeyAnnotations(Dictionary<String,Object>, IForeignKey, RuntimeForeignKey, Boolean)

更新将在只读对象上设置的外键批注。

ProcessIndexAnnotations(Dictionary<String,Object>, IIndex, RuntimeIndex, Boolean)

更新将在只读对象上设置的索引批注。

ProcessKeyAnnotations(Dictionary<String,Object>, IKey, RuntimeKey, Boolean)

更新将在只读对象上设置的键批注。

ProcessKeyAnnotations(IDictionary<String,Object>, IKey, RuntimeKey, Boolean)

更新将在只读对象上设置的键批注。

ProcessModelAnnotations(Dictionary<String,Object>, IModel, RuntimeModel, Boolean)

更新将在只读对象上设置的模型批注。

ProcessModelFinalized(IModel)

在最终确定模型后调用,并且无法再发生改变。

ProcessNavigationAnnotations(Dictionary<String,Object>, INavigation, RuntimeNavigation, Boolean)

更新将在只读对象上设置的导航批注。

ProcessPropertyAnnotations(Dictionary<String,Object>, IProperty, RuntimeProperty, Boolean)

更新将在只读对象上设置的属性批注。

ProcessServicePropertyAnnotations(Dictionary<String,Object>, IServiceProperty, RuntimeServiceProperty, Boolean)

更新将在只读对象上设置的服务属性批注。

ProcessSkipNavigationAnnotations(Dictionary<String,Object>, ISkipNavigation, RuntimeSkipNavigation, Boolean)

更新将在只读对象上设置的跳过导航批注。

ProcessTriggerAnnotations(Dictionary<String,Object>, ITrigger, RuntimeTrigger, Boolean)

更新将在只读对象上设置的触发器批注。

ProcessTypeMappingConfigurationAnnotations(Dictionary<String,Object>, ITypeMappingConfiguration, RuntimeTypeMappingConfiguration, Boolean)

更新将在只读对象上设置的属性批注。

适用于