語言

CheckConstraintConvention 類別

定義

一種確保導出型別檢查約束與基底類型檢查約束相容的慣例。 同時也確保宣告的類型是最新的。

[System.Runtime.CompilerServices.Nullable(0)]
public class CheckConstraintConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeBaseTypeChangedConvention
public class CheckConstraintConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeBaseTypeChangedConvention
[<System.Runtime.CompilerServices.Nullable(0)>]
type CheckConstraintConvention = class
    interface IEntityTypeBaseTypeChangedConvention
    interface IConvention
    interface IEntityTypeAddedConvention
type CheckConstraintConvention = class
    interface IEntityTypeBaseTypeChangedConvention
    interface IConvention
    interface IEntityTypeAddedConvention
Public Class CheckConstraintConvention
Implements IEntityTypeAddedConvention, IEntityTypeBaseTypeChangedConvention
繼承
CheckConstraintConvention
屬性
實作

備註

更多資訊與範例請參閱 模型建構慣例 。

建構函式

名稱 Description
CheckConstraintConvention(ProviderConventionSetBuilderDependencies, RelationalConventionSetBuilderDependencies)

建立一個新的 實例。CheckConstraintConvention

屬性

名稱 Description
Dependencies

此服務的依賴關係。

RelationalDependencies

此服務的關聯提供者專屬相依關係。

方法

名稱 Description
ProcessEntityTypeAdded(IConventionEntityTypeBuilder, IConventionContext<IConventionEntityTypeBuilder>)

在模型中加入實體類型後呼叫。

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

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

適用於