SqlServerPropertyBuilderExtensions.CanSetIdentityColumnSeed 方法

定義

多載

CanSetIdentityColumnSeed(IConventionPropertyBuilder, Nullable<Int32>, Boolean)

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

CanSetIdentityColumnSeed(IConventionPropertyBuilder, Nullable<Int64>, Boolean)

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

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

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

CanSetIdentityColumnSeed(IConventionPropertyBuilder, Nullable<Int32>, Boolean)

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

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

參數

propertyBuilder
IConventionPropertyBuilder

要設定之屬性的產生器。

seed
Nullable<Int32>

用於載入資料表之第一個資料列的值。

fromDataAnnotation
Boolean

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

傳回

true如果指定的值可以設定為SQL Server IDENTITY 的種子,則為 。

適用於

CanSetIdentityColumnSeed(IConventionPropertyBuilder, Nullable<Int64>, Boolean)

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

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

參數

propertyBuilder
IConventionPropertyBuilder

要設定之屬性的產生器。

seed
Nullable<Int64>

用於載入資料表之第一個資料列的值。

fromDataAnnotation
Boolean

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

傳回

true如果指定的值可以設定為SQL Server IDENTITY 的種子,則為 。

備註

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

適用於

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

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

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

參數

propertyBuilder
IConventionPropertyBuilder

要設定之屬性的產生器。

seed
Nullable<Int64>

用於載入資料表之第一個資料列的值。

storeObject
StoreObjectIdentifier

資料表識別碼。

fromDataAnnotation
Boolean

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

傳回

true如果指定的值可以設定為SQL Server IDENTITY 的種子,則為 。

備註

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

適用於