ModelCleanupConvention 类

定义

一种约定,用于删除仅在模型生成期间使用的任何状态。

public class ModelCleanupConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IModelFinalizedConvention
public class ModelCleanupConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IModelFinalizingConvention
public class ModelCleanupConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyRemovedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IModelFinalizingConvention
type ModelCleanupConvention = class
    interface IModelFinalizedConvention
    interface IConvention
type ModelCleanupConvention = class
    interface IModelFinalizingConvention
    interface IConvention
type ModelCleanupConvention = class
    interface IForeignKeyRemovedConvention
    interface IConvention
    interface IModelFinalizingConvention
Public Class ModelCleanupConvention
Implements IModelFinalizedConvention
Public Class ModelCleanupConvention
Implements IModelFinalizingConvention
Public Class ModelCleanupConvention
Implements IForeignKeyRemovedConvention, IModelFinalizingConvention
继承
ModelCleanupConvention
实现

注解

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

构造函数

ModelCleanupConvention(ProviderConventionSetBuilderDependencies)

创建 ModelCleanupConvention 的新实例。

属性

Dependencies

此服务的依赖项。

方法

ProcessForeignKeyRemoved(IConventionEntityTypeBuilder, IConventionForeignKey, IConventionContext<IConventionForeignKey>)

在删除外键后调用。

ProcessModelFinalized(IConventionModelBuilder, IConventionContext<IConventionModelBuilder>)

在模型最终确定后调用。

ProcessModelFinalizing(IConventionModelBuilder, IConventionContext<IConventionModelBuilder>)

在最终确定模型时调用。

适用于