Share via


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 否则为 。

属性

适用于