SqlServerPropertyBuilderExtensions.CanSetIdentityColumnIncrement 方法

定義

多載

CanSetIdentityColumnIncrement(IConventionPropertyBuilder, Nullable<Int32>, Boolean)

傳回值,指出指定的值是否可以設定為SQL Server IDENTITY 的遞增。

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

傳回值,指出特定資料表的指定值是否可以設定為SQL Server IDENTITY 的遞增。

CanSetIdentityColumnIncrement(IConventionPropertyBuilder, Nullable<Int32>, Boolean)

傳回值,指出指定的值是否可以設定為SQL Server IDENTITY 的遞增。

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

參數

propertyBuilder
IConventionPropertyBuilder

要設定之屬性的產生器。

increment
Nullable<Int32>

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

fromDataAnnotation
Boolean

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

傳回

true如果指定的值可以設定為SQL Server IDENTITY 的預設增量,則為 。

備註

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

適用於

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

傳回值,指出特定資料表的指定值是否可以設定為SQL Server IDENTITY 的遞增。

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

參數

propertyBuilder
IConventionPropertyBuilder

要設定之屬性的產生器。

increment
Nullable<Int32>

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

storeObject
StoreObjectIdentifier

資料表識別碼。

fromDataAnnotation
Boolean

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

傳回

true如果指定的值可以設定為SQL Server IDENTITY 的預設增量,則為 。

備註

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

適用於