SqlServerModelExtensions.SetIdentityIncrement 方法

定义

重载

SetIdentityIncrement(IConventionModel, Nullable<Int32>, Boolean)

设置默认标识增量。

SetIdentityIncrement(IMutableModel, Nullable<Int32>)

设置默认标识增量。

SetIdentityIncrement(IConventionModel, Nullable<Int32>, Boolean)

设置默认标识增量。

public static void SetIdentityIncrement (this Microsoft.EntityFrameworkCore.Metadata.IConventionModel model, int? increment, bool fromDataAnnotation = false);
public static int? SetIdentityIncrement (this Microsoft.EntityFrameworkCore.Metadata.IConventionModel model, int? increment, bool fromDataAnnotation = false);
static member SetIdentityIncrement : Microsoft.EntityFrameworkCore.Metadata.IConventionModel * Nullable<int> * bool -> unit
static member SetIdentityIncrement : Microsoft.EntityFrameworkCore.Metadata.IConventionModel * Nullable<int> * bool -> Nullable<int>
<Extension()>
Public Sub SetIdentityIncrement (model As IConventionModel, increment As Nullable(Of Integer), Optional fromDataAnnotation As Boolean = false)
<Extension()>
Public Function SetIdentityIncrement (model As IConventionModel, increment As Nullable(Of Integer), Optional fromDataAnnotation As Boolean = false) As Nullable(Of Integer)

参数

model
IConventionModel

模型。

increment
Nullable<Int32>

要设置的值。

fromDataAnnotation
Boolean

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

返回

配置的值。

适用于

SetIdentityIncrement(IMutableModel, Nullable<Int32>)

设置默认标识增量。

public static void SetIdentityIncrement (this Microsoft.EntityFrameworkCore.Metadata.IMutableModel model, int? increment);
static member SetIdentityIncrement : Microsoft.EntityFrameworkCore.Metadata.IMutableModel * Nullable<int> -> unit
<Extension()>
Public Sub SetIdentityIncrement (model As IMutableModel, increment As Nullable(Of Integer))

参数

model
IMutableModel

模型。

increment
Nullable<Int32>

要设置的值。

适用于