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)

适用于