语言

StoreGenerationConvention 类

定义

一种约定,可确保属性未配置为同时具有默认值和计算列。

[System.Runtime.CompilerServices.Nullable(0)]
public class StoreGenerationConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IModelFinalizingConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IPropertyAnnotationChangedConvention
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
[<System.Runtime.CompilerServices.Nullable(0)>]
type StoreGenerationConvention = class
    interface IPropertyAnnotationChangedConvention
    interface IConvention
    interface IModelFinalizingConvention
type StoreGenerationConvention = class
    interface IPropertyAnnotationChangedConvention
    interface IConvention
    interface IModelFinalizedConvention
type StoreGenerationConvention = class
    interface IPropertyAnnotationChangedConvention
    interface IConvention
    interface IModelFinalizingConvention
Public Class StoreGenerationConvention
Implements IModelFinalizingConvention, IPropertyAnnotationChangedConvention
Public Class StoreGenerationConvention
Implements IModelFinalizedConvention, 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, StoreObjectIdentifier)

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

Validate(IConventionProperty)

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

适用于