SqlServerModelBuilderExtensions.ForSqlServerHasIdentityIncrement 方法

定义

注意

Use HasIdentityColumnIncrement

配置 SQL Server IDENTITY 的默认增量。

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

参数

modelBuilder
IConventionModelBuilder

模型生成器。

increment
Nullable<Int32>

添加到已加载的上一行的标识值的增量值。

fromDataAnnotation
Boolean

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

返回

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

属性

适用于