共用方式為


SqlServerStoreGenerationConvention 類別

定義

慣例,可確保屬性未設定為具有預設值,如計算資料行或 SqlServerValueGenerationStrategy 同時使用 。

public class SqlServerStoreGenerationConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.StoreGenerationConvention
type SqlServerStoreGenerationConvention = class
    inherit StoreGenerationConvention
Public Class SqlServerStoreGenerationConvention
Inherits StoreGenerationConvention
繼承
SqlServerStoreGenerationConvention

備註

如需詳細資訊和範例,請參閱使用 EF Core建立模型慣例和存取SQL Server和Azure SQL資料庫

建構函式

SqlServerStoreGenerationConvention(ProviderConventionSetBuilderDependencies, RelationalConventionSetBuilderDependencies)

建立 SqlServerStoreGenerationConvention 的新執行個體。

屬性

Dependencies

此服務的相依性。

(繼承來源 StoreGenerationConvention)
RelationalDependencies

此服務的關聯式提供者特定相依性。

(繼承來源 StoreGenerationConvention)

方法

ProcessModelFinalized(IConventionModelBuilder, IConventionContext<IConventionModelBuilder>)

在模型完成之後呼叫。

(繼承來源 StoreGenerationConvention)
ProcessModelFinalizing(IConventionModelBuilder, IConventionContext<IConventionModelBuilder>)

當模型完成時呼叫。

(繼承來源 StoreGenerationConvention)
ProcessPropertyAnnotationChanged(IConventionPropertyBuilder, String, IConventionAnnotation, IConventionAnnotation, IConventionContext<IConventionAnnotation>)

在屬性上變更批註之後呼叫。

Validate(IConventionProperty)

慣例,可確保屬性未設定為具有預設值,如計算資料行或 SqlServerValueGenerationStrategy 同時使用 。

Validate(IConventionProperty)

如果這個屬性有衝突的存放區產生組態,則會擲回 。

(繼承來源 StoreGenerationConvention)
Validate(IConventionProperty, StoreObjectIdentifier)

如果這個屬性有衝突的存放區產生組態,則會擲回 。

Validate(IConventionProperty, StoreObjectIdentifier)

如果這個屬性有衝突的存放區產生組態,則會擲回 。

(繼承來源 StoreGenerationConvention)

適用於