SqlServerPropertyBuilderExtensions.HasIdentityColumnIncrement 方法

定義

多載

HasIdentityColumnIncrement(IConventionPropertyBuilder, Nullable<Int32>, Boolean)

設定SQL SERVER IDENTITY 的增量。

HasIdentityColumnIncrement(IConventionPropertyBuilder, Nullable<Int32>, StoreObjectIdentifier, Boolean)

設定特定資料表SQL Server IDENTITY 的遞增。

HasIdentityColumnIncrement(IConventionPropertyBuilder, Nullable<Int32>, Boolean)

設定SQL SERVER IDENTITY 的增量。

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

參數

propertyBuilder
IConventionPropertyBuilder

要設定之屬性的產生器。

increment
Nullable<Int32>

加入至載入前一個資料列之識別值的累加值。

fromDataAnnotation
Boolean

指出是否使用資料批註來指定組態。

傳回

如果套用組態,則為相同的產生器實例, null 否則為 。

備註

如需詳細資訊和範例,請參閱使用 EF Core建立實體類型和關聯性的模型化,以及存取SQL Server和Azure SQL資料庫

適用於

HasIdentityColumnIncrement(IConventionPropertyBuilder, Nullable<Int32>, StoreObjectIdentifier, Boolean)

設定特定資料表SQL Server IDENTITY 的遞增。

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

參數

propertyBuilder
IConventionPropertyBuilder

要設定之屬性的產生器。

increment
Nullable<Int32>

加入至載入前一個資料列之識別值的累加值。

storeObject
StoreObjectIdentifier

資料表識別碼。

fromDataAnnotation
Boolean

指出是否使用資料批註來指定組態。

傳回

如果套用組態,則為相同的產生器實例, null 否則為 。

備註

如需詳細資訊和範例,請參閱使用 EF Core建立實體類型和關聯性的模型化,以及存取SQL Server和Azure SQL資料庫

適用於