SqlServerModelExtensions.SetIdentitySeed 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
SetIdentitySeed(IConventionModel, Nullable<Int64>, Boolean)
設定預設身分識別種子。
public static long? SetIdentitySeed (this Microsoft.EntityFrameworkCore.Metadata.IConventionModel model, long? seed, bool fromDataAnnotation = false);
static member SetIdentitySeed : Microsoft.EntityFrameworkCore.Metadata.IConventionModel * Nullable<int64> * bool -> Nullable<int64>
<Extension()>
Public Function SetIdentitySeed (model As IConventionModel, seed As Nullable(Of Long), Optional fromDataAnnotation As Boolean = false) As Nullable(Of Long)
參數
- model
- IConventionModel
模型本身。
- fromDataAnnotation
- Boolean
指出是否使用資料批註來指定組態。
傳回
已設定的值。
適用於
SetIdentitySeed(IConventionModel, Nullable<Int32>, Boolean)
設定預設身分識別種子。
public static void SetIdentitySeed (this Microsoft.EntityFrameworkCore.Metadata.IConventionModel model, int? seed, bool fromDataAnnotation = false);
public static int? SetIdentitySeed (this Microsoft.EntityFrameworkCore.Metadata.IConventionModel model, int? seed, bool fromDataAnnotation = false);
static member SetIdentitySeed : Microsoft.EntityFrameworkCore.Metadata.IConventionModel * Nullable<int> * bool -> unit
static member SetIdentitySeed : Microsoft.EntityFrameworkCore.Metadata.IConventionModel * Nullable<int> * bool -> Nullable<int>
<Extension()>
Public Sub SetIdentitySeed (model As IConventionModel, seed As Nullable(Of Integer), Optional fromDataAnnotation As Boolean = false)
<Extension()>
Public Function SetIdentitySeed (model As IConventionModel, seed As Nullable(Of Integer), Optional fromDataAnnotation As Boolean = false) As Nullable(Of Integer)
參數
- model
- IConventionModel
模型本身。
- fromDataAnnotation
- Boolean
指出是否使用資料批註來指定組態。
傳回
已設定的值。
適用於
SetIdentitySeed(IMutableModel, Nullable<Int32>)
設定預設身分識別種子。
public static void SetIdentitySeed (this Microsoft.EntityFrameworkCore.Metadata.IMutableModel model, int? seed);
static member SetIdentitySeed : Microsoft.EntityFrameworkCore.Metadata.IMutableModel * Nullable<int> -> unit
<Extension()>
Public Sub SetIdentitySeed (model As IMutableModel, seed As Nullable(Of Integer))
參數
- model
- IMutableModel
模型本身。
適用於
SetIdentitySeed(IMutableModel, Nullable<Int64>)
設定預設身分識別種子。
public static void SetIdentitySeed (this Microsoft.EntityFrameworkCore.Metadata.IMutableModel model, long? seed);
static member SetIdentitySeed : Microsoft.EntityFrameworkCore.Metadata.IMutableModel * Nullable<int64> -> unit
<Extension()>
Public Sub SetIdentitySeed (model As IMutableModel, seed As Nullable(Of Long))
參數
- model
- IMutableModel
模型本身。