SqlServerPropertyBuilderExtensions.HasIdentityColumnIncrement 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | Description |
|---|---|
| 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
正在配置的物業的建商。
- 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
正在配置的物業的建商。
- storeObject
- StoreObjectIdentifier
資料表識別碼。
- fromDataAnnotation
- Boolean
表示配置是否以資料註解方式指定。
傳回
如果設定是套用,則使用同一個建構者實例, null 否則。
備註
更多資訊與範例請參閱「建模實體類型與關係」,以及「使用 EF Core 存取 SQL Server 與 Azure SQL 資料庫」。