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 階層中最接近的實體類型。 (繼承來源 InheritanceDiscoveryConventionBase) |
ProcessEntityTypeAdded(IConventionEntityTypeBuilder, IConventionContext<IConventionEntityTypeBuilder>) |
在實體類型新增至模型之後呼叫。 |
ProcessForeignKeyOwnershipChanged(IConventionForeignKeyBuilder, IConventionContext<Nullable<Boolean>>) |
在外鍵的擁有權值變更之後呼叫。 |
ProcessForeignKeyRemoved(IConventionEntityTypeBuilder, IConventionForeignKey, IConventionContext<IConventionForeignKey>) |
移除外鍵之後呼叫。 |
適用於
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應