共用方式為


StoreGenerationConvention 類別

定義

一種慣例,可確保屬性未設定為具有預設值,而且同時做為計算資料行。

public class StoreGenerationConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IModelFinalizedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IPropertyAnnotationChangedConvention
public class StoreGenerationConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IModelFinalizingConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IPropertyAnnotationChangedConvention
type StoreGenerationConvention = class
    interface IPropertyAnnotationChangedConvention
    interface IConvention
    interface IModelFinalizedConvention
type StoreGenerationConvention = class
    interface IPropertyAnnotationChangedConvention
    interface IConvention
    interface IModelFinalizingConvention
Public Class StoreGenerationConvention
Implements IModelFinalizedConvention, IPropertyAnnotationChangedConvention
Public Class StoreGenerationConvention
Implements IModelFinalizingConvention, IPropertyAnnotationChangedConvention
繼承
StoreGenerationConvention
衍生
實作

備註

如需詳細資訊和範例,請參閱 模型建置慣例EF Core 價值產生

建構函式

StoreGenerationConvention(ProviderConventionSetBuilderDependencies, RelationalConventionSetBuilderDependencies)

建立 StoreGenerationConvention 的新執行個體。

屬性

Dependencies

此服務的相依性。

RelationalDependencies

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

方法

ProcessModelFinalized(IConventionModelBuilder, IConventionContext<IConventionModelBuilder>)

在模型完成之後呼叫。

ProcessModelFinalizing(IConventionModelBuilder, IConventionContext<IConventionModelBuilder>)

在完成模型時呼叫。

ProcessPropertyAnnotationChanged(IConventionPropertyBuilder, String, IConventionAnnotation, IConventionAnnotation, IConventionContext<IConventionAnnotation>)

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

Validate(IConventionProperty)

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

Validate(IConventionProperty, StoreObjectIdentifier)

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

適用於