BaseTypeDiscoveryConvention 类

定义

一种约定,用于根据关联的 CLR 类型层次结构查找已属于模型一部分的基实体类型和派生实体类型。

public class BaseTypeDiscoveryConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.InheritanceDiscoveryConventionBase, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAddedConvention
public class BaseTypeDiscoveryConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.InheritanceDiscoveryConventionBase, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyOwnershipChangedConvention
public class BaseTypeDiscoveryConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.InheritanceDiscoveryConventionBase, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyRemovedConvention
public class BaseTypeDiscoveryConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyRemovedConvention
type BaseTypeDiscoveryConvention = class
    inherit InheritanceDiscoveryConventionBase
    interface IEntityTypeAddedConvention
    interface IConvention
type BaseTypeDiscoveryConvention = class
    inherit InheritanceDiscoveryConventionBase
    interface IEntityTypeAddedConvention
    interface IConvention
    interface IForeignKeyOwnershipChangedConvention
type BaseTypeDiscoveryConvention = class
    inherit InheritanceDiscoveryConventionBase
    interface IEntityTypeAddedConvention
    interface IConvention
    interface IForeignKeyRemovedConvention
type BaseTypeDiscoveryConvention = class
    interface IEntityTypeAddedConvention
    interface IConvention
    interface IForeignKeyRemovedConvention
Public Class BaseTypeDiscoveryConvention
Inherits InheritanceDiscoveryConventionBase
Implements IEntityTypeAddedConvention
Public Class BaseTypeDiscoveryConvention
Inherits InheritanceDiscoveryConventionBase
Implements IEntityTypeAddedConvention, IForeignKeyOwnershipChangedConvention
Public Class BaseTypeDiscoveryConvention
Inherits InheritanceDiscoveryConventionBase
Implements IEntityTypeAddedConvention, IForeignKeyRemovedConvention
Public Class BaseTypeDiscoveryConvention
Implements IEntityTypeAddedConvention, IForeignKeyRemovedConvention
继承
BaseTypeDiscoveryConvention
继承
BaseTypeDiscoveryConvention
实现

注解

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

构造函数

BaseTypeDiscoveryConvention(ProviderConventionSetBuilderDependencies)

创建 BaseTypeDiscoveryConvention 的新实例。

属性

Dependencies

此服务的依赖项。

Dependencies

此服务的依赖项。

(继承自 InheritanceDiscoveryConventionBase)

方法

FindClosestBaseType(IConventionEntityType)

在模型中查找一个实体类型,该实体类型与给定实体类型的关联 CLR 类型派生自且是 CLR 层次结构中最近的 CLR 类型。

(继承自 InheritanceDiscoveryConventionBase)
ProcessEntityTypeAdded(IConventionEntityTypeBuilder, IConventionContext<IConventionEntityTypeBuilder>)

在实体类型添加到模型后调用。

ProcessForeignKeyOwnershipChanged(IConventionForeignKeyBuilder, IConventionContext<Nullable<Boolean>>)

在更改外键的所有权值后调用。

ProcessForeignKeyRemoved(IConventionEntityTypeBuilder, IConventionForeignKey, IConventionContext<IConventionForeignKey>)

在删除外键后调用。

适用于