語言

SqlServerModelBuilderExtensions.HasIdentityColumnSeed 方法

定義

多載

名稱 Description
HasIdentityColumnSeed(IConventionModelBuilder, Nullable<Int32>, Boolean)

設定 SQL Server IDENTITY 的預設種子。

HasIdentityColumnSeed(IConventionModelBuilder, Nullable<Int64>, Boolean)

設定 SQL Server IDENTITY 的預設種子。

HasIdentityColumnSeed(IConventionModelBuilder, Nullable<Int32>, Boolean)

來源:
SqlServerModelBuilderExtensions.cs
來源:
SqlServerModelBuilderExtensions.cs
來源:
SqlServerModelBuilderExtensions.cs

設定 SQL Server IDENTITY 的預設種子。

public static Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionModelBuilder HasIdentityColumnSeed(this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionModelBuilder modelBuilder, int? seed, bool fromDataAnnotation = false);
static member HasIdentityColumnSeed : Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionModelBuilder * Nullable<int> * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionModelBuilder
<Extension()>
Public Function HasIdentityColumnSeed (modelBuilder As IConventionModelBuilder, seed As Nullable(Of Integer), Optional fromDataAnnotation As Boolean = false) As IConventionModelBuilder

參數

modelBuilder
IConventionModelBuilder

模型建構器。

seed
Nullable<Int32>

用於載入資料表中第一個數據列的值。

fromDataAnnotation
Boolean

表示配置是否以資料註解方式指定。

傳回

如果設定是套用,則使用同一個建構者實例, null 否則。

適用於

HasIdentityColumnSeed(IConventionModelBuilder, Nullable<Int64>, Boolean)

來源:
SqlServerModelBuilderExtensions.cs
來源:
SqlServerModelBuilderExtensions.cs
來源:
SqlServerModelBuilderExtensions.cs
來源:
SqlServerModelBuilderExtensions.cs
來源:
SqlServerModelBuilderExtensions.cs
來源:
SqlServerModelBuilderExtensions.cs

設定 SQL Server IDENTITY 的預設種子。

public static Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionModelBuilder? HasIdentityColumnSeed(this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionModelBuilder modelBuilder, long? seed, bool fromDataAnnotation = false);
static member HasIdentityColumnSeed : Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionModelBuilder * Nullable<int64> * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionModelBuilder
<Extension()>
Public Function HasIdentityColumnSeed (modelBuilder As IConventionModelBuilder, seed As Nullable(Of Long), Optional fromDataAnnotation As Boolean = false) As IConventionModelBuilder

參數

modelBuilder
IConventionModelBuilder

模型建構器。

seed
Nullable<Int64>

用於載入資料表中第一個數據列的值。

fromDataAnnotation
Boolean

表示配置是否以資料註解方式指定。

傳回

如果設定是套用,則使用同一個建構者實例, null 否則。

備註

更多資訊與範例請參閱「建模實體類型與關係」,以及「使用 EF Core 存取 SQL Server 與 Azure SQL 資料庫」。

適用於