IndexAttributeConvention 類別

定義

根據 設定資料庫索引的 IndexAttribute 慣例。

public class IndexAttributeConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeBaseTypeChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IModelFinalizingConvention
type IndexAttributeConvention = class
    interface IEntityTypeAddedConvention
    interface IConvention
    interface IEntityTypeBaseTypeChangedConvention
    interface IModelFinalizingConvention
Public Class IndexAttributeConvention
Implements IEntityTypeAddedConvention, IEntityTypeBaseTypeChangedConvention, IModelFinalizingConvention
繼承
IndexAttributeConvention
實作

備註

如需詳細資訊和範例,請參閱 模型建置慣例

建構函式

IndexAttributeConvention(ProviderConventionSetBuilderDependencies)

建立 IndexAttributeConvention 的新執行個體。

屬性

Dependencies

此服務的相依性。

方法

ProcessEntityTypeAdded(IConventionEntityTypeBuilder, IConventionContext<IConventionEntityTypeBuilder>)

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

ProcessEntityTypeBaseTypeChanged(IConventionEntityTypeBuilder, IConventionEntityType, IConventionEntityType, IConventionContext<IConventionEntityType>)

在實體類型的基底類型變更之後呼叫。

ProcessModelFinalizing(IConventionModelBuilder, IConventionContext<IConventionModelBuilder>)

當模型完成時呼叫。

適用於