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)

如果此属性的存储生成配置存在冲突,则引发 。

适用于