BaseTypeDiscoveryConvention 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
一种约定,用于根据关联的 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(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>) |
在删除外键后调用。 |
适用于
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈