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 階層中最接近的實體類型。

(繼承來源 InheritanceDiscoveryConventionBase)
ProcessEntityTypeAdded(IConventionEntityTypeBuilder, IConventionContext<IConventionEntityTypeBuilder>)

在實體類型新增至模型之後呼叫。

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

在外鍵的擁有權值變更之後呼叫。

ProcessForeignKeyRemoved(IConventionEntityTypeBuilder, IConventionForeignKey, IConventionContext<IConventionForeignKey>)

移除外鍵之後呼叫。

適用於