SqlServerModelBuilderExtensions.CanSetIdentityColumnSeed 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | Description |
|---|---|
| CanSetIdentityColumnSeed(IConventionModelBuilder, Nullable<Int32>, Boolean) |
回傳一個值,表示該值是否可設定為 SQL Server IDENTITY 的預設種子。 |
| CanSetIdentityColumnSeed(IConventionModelBuilder, Nullable<Int64>, Boolean) |
回傳一個值,表示該值是否可設定為 SQL Server IDENTITY 的預設種子。 |
CanSetIdentityColumnSeed(IConventionModelBuilder, Nullable<Int32>, Boolean)
回傳一個值,表示該值是否可設定為 SQL Server IDENTITY 的預設種子。
public static bool CanSetIdentityColumnSeed(this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionModelBuilder modelBuilder, int? seed, bool fromDataAnnotation = false);
static member CanSetIdentityColumnSeed : Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionModelBuilder * Nullable<int> * bool -> bool
<Extension()>
Public Function CanSetIdentityColumnSeed (modelBuilder As IConventionModelBuilder, seed As Nullable(Of Integer), Optional fromDataAnnotation As Boolean = false) As Boolean
參數
- modelBuilder
- IConventionModelBuilder
模型建構器。
- fromDataAnnotation
- Boolean
表示配置是否以資料註解方式指定。
傳回
true若該給定值可設定為 SQL Server IDENTITY 的種子。
適用於
CanSetIdentityColumnSeed(IConventionModelBuilder, Nullable<Int64>, Boolean)
回傳一個值,表示該值是否可設定為 SQL Server IDENTITY 的預設種子。
public static bool CanSetIdentityColumnSeed(this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionModelBuilder modelBuilder, long? seed, bool fromDataAnnotation = false);
static member CanSetIdentityColumnSeed : Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionModelBuilder * Nullable<int64> * bool -> bool
<Extension()>
Public Function CanSetIdentityColumnSeed (modelBuilder As IConventionModelBuilder, seed As Nullable(Of Long), Optional fromDataAnnotation As Boolean = false) As Boolean
參數
- modelBuilder
- IConventionModelBuilder
模型建構器。
- fromDataAnnotation
- Boolean
表示配置是否以資料註解方式指定。
傳回
true若該給定值可設定為 SQL Server IDENTITY 的種子。
備註
更多資訊與範例請參閱「建模實體類型與關係」,以及「使用 EF Core 存取 SQL Server 與 Azure SQL 資料庫」。