SqlServerPropertyBuilderExtensions.HasIdentityColumnSeed 方法

定义

重载

HasIdentityColumnSeed(IConventionPropertyBuilder, Nullable<Int32>, Boolean)

配置 SQL Server IDENTITY 的种子。

HasIdentityColumnSeed(IConventionPropertyBuilder, Nullable<Int64>, Boolean)

配置 SQL Server IDENTITY 的种子。

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

为特定表配置 SQL Server IDENTITY 的种子。

HasIdentityColumnSeed(IConventionPropertyBuilder, Nullable<Int32>, Boolean)

Source:
SqlServerPropertyBuilderExtensions.cs
Source:
SqlServerPropertyBuilderExtensions.cs
Source:
SqlServerPropertyBuilderExtensions.cs

配置 SQL Server IDENTITY 的种子。

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

参数

propertyBuilder
IConventionPropertyBuilder

要配置的属性的生成器。

seed
Nullable<Int32>

用于加载到表中的第一行的值。

fromDataAnnotation
Boolean

指示配置是否是使用数据注释指定的。

返回

如果应用了配置,则为同一生成器实例, null 否则为 。

适用于

HasIdentityColumnSeed(IConventionPropertyBuilder, Nullable<Int64>, Boolean)

Source:
SqlServerPropertyBuilderExtensions.cs
Source:
SqlServerPropertyBuilderExtensions.cs
Source:
SqlServerPropertyBuilderExtensions.cs
Source:
SqlServerPropertyBuilderExtensions.cs

配置 SQL Server IDENTITY 的种子。

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

参数

propertyBuilder
IConventionPropertyBuilder

要配置的属性的生成器。

seed
Nullable<Int64>

用于加载到表中的第一行的值。

fromDataAnnotation
Boolean

指示配置是否是使用数据注释指定的。

返回

如果应用了配置,则为同一生成器实例, null 否则为 。

注解

有关详细信息和示例,请参阅为实体类型和关系建模和使用 EF Core 访问SQL Server和Azure SQL数据库

适用于

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

Source:
SqlServerPropertyBuilderExtensions.cs
Source:
SqlServerPropertyBuilderExtensions.cs
Source:
SqlServerPropertyBuilderExtensions.cs

为特定表配置 SQL Server IDENTITY 的种子。

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

参数

propertyBuilder
IConventionPropertyBuilder

要配置的属性的生成器。

seed
Nullable<Int64>

用于加载到表中的第一行的值。

storeObject
StoreObjectIdentifier

表标识符。

fromDataAnnotation
Boolean

指示配置是否是使用数据注释指定的。

返回

如果应用了配置,则为同一生成器实例, null 否则为 。

注解

有关详细信息和示例,请参阅为实体类型和关系建模和使用 EF Core 访问SQL Server和Azure SQL数据库

适用于