语言

SqlServerModelBuilderExtensions.ForSqlServerHasIdentitySeed 方法

定义

注意

Use HasIdentityColumnSeed

为 SQL Server IDENTITY 配置默认种子。

[System.Obsolete("Use HasIdentityColumnSeed")]
public static Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionModelBuilder ForSqlServerHasIdentitySeed(this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionModelBuilder modelBuilder, int? seed, bool fromDataAnnotation = false);
[<System.Obsolete("Use HasIdentityColumnSeed")>]
static member ForSqlServerHasIdentitySeed : Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionModelBuilder * Nullable<int> * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionModelBuilder
<Extension()>
Public Function ForSqlServerHasIdentitySeed (modelBuilder As IConventionModelBuilder, seed As Nullable(Of Integer), Optional fromDataAnnotation As Boolean = false) As IConventionModelBuilder

参数

modelBuilder
IConventionModelBuilder

模型生成器。

seed
Nullable<Int32>

加载到表中的第一个行所使用的值。

fromDataAnnotation
Boolean

指示是否使用数据注释指定了配置。

返回

如果应用了配置,则为同一生成器实例, null 否则为同一个生成器实例。

特性

适用于