SqlServerModelExtensions.SetIdentityIncrement 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
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
模型。
- 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
模型。