語言

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 否則。

屬性

適用於