語言

SqlServerPropertyBuilderExtensions.HasIdentityColumnSeed 方法

定義

多載

HasIdentityColumnSeed(IConventionPropertyBuilder, Nullable<Int32>, Boolean)

來源:
SqlServerPropertyBuilderExtensions.cs
來源:
SqlServerPropertyBuilderExtensions.cs
來源:
SqlServerPropertyBuilderExtensions.cs

配置 SQL Server IDENTITY 的種子。

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

參數

propertyBuilder
IConventionPropertyBuilder

正在配置的物業的建商。

seed
Nullable<Int32>

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

fromDataAnnotation
Boolean

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

傳回

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

適用於

HasIdentityColumnSeed(IConventionPropertyBuilder, Nullable<Int64>, Boolean)

來源:
SqlServerPropertyBuilderExtensions.cs
來源:
SqlServerPropertyBuilderExtensions.cs
來源:
SqlServerPropertyBuilderExtensions.cs
來源:
SqlServerPropertyBuilderExtensions.cs
來源:
SqlServerPropertyBuilderExtensions.cs
來源:
SqlServerPropertyBuilderExtensions.cs

配置 SQL Server IDENTITY 的種子。

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

參數

propertyBuilder
IConventionPropertyBuilder

正在配置的物業的建商。

seed
Nullable<Int64>

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

fromDataAnnotation
Boolean

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

傳回

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

備註

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

適用於

HasIdentityColumnSeed(IConventionPropertyBuilder, Nullable<Int64>, StoreObjectIdentifier, Boolean)

來源:
SqlServerPropertyBuilderExtensions.cs
來源:
SqlServerPropertyBuilderExtensions.cs
來源:
SqlServerPropertyBuilderExtensions.cs
來源:
SqlServerPropertyBuilderExtensions.cs
來源:
SqlServerPropertyBuilderExtensions.cs

為特定資料表配置 SQL Server IDENTITY 的種子。

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

參數

propertyBuilder
IConventionPropertyBuilder

正在配置的物業的建商。

seed
Nullable<Int64>

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

storeObject
StoreObjectIdentifier

資料表識別碼。

fromDataAnnotation
Boolean

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

傳回

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

備註

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

適用於