SqlServerComplexTypePropertyBuilderExtensions.UseIdentityColumn 方法

定义

重载

UseIdentityColumn(ComplexTypePropertyBuilder, Int32, Int32)

将 key 属性配置为在面向SQL Server时使用 SQL Server IDENTITY 功能为新实体生成值。 此方法将 属性设置为 OnAdd

UseIdentityColumn(ComplexTypePropertyBuilder, Int64, Int32)

将 key 属性配置为在面向SQL Server时使用 SQL Server IDENTITY 功能为新实体生成值。 此方法将 属性设置为 OnAdd

UseIdentityColumn<TProperty>(ComplexTypePropertyBuilder<TProperty>, Int32, Int32)

将 key 属性配置为在面向SQL Server时使用 SQL Server IDENTITY 功能为新实体生成值。 此方法将 属性设置为 OnAdd

UseIdentityColumn<TProperty>(ComplexTypePropertyBuilder<TProperty>, Int64, Int32)

将 key 属性配置为在面向SQL Server时使用 SQL Server IDENTITY 功能为新实体生成值。 此方法将 属性设置为 OnAdd

UseIdentityColumn(ComplexTypePropertyBuilder, Int32, Int32)

将 key 属性配置为在面向SQL Server时使用 SQL Server IDENTITY 功能为新实体生成值。 此方法将 属性设置为 OnAdd

public static Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexTypePropertyBuilder UseIdentityColumn (this Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexTypePropertyBuilder propertyBuilder, int seed, int increment = 1);
static member UseIdentityColumn : Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexTypePropertyBuilder * int * int -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexTypePropertyBuilder
<Extension()>
Public Function UseIdentityColumn (propertyBuilder As ComplexTypePropertyBuilder, seed As Integer, Optional increment As Integer = 1) As ComplexTypePropertyBuilder

参数

propertyBuilder
ComplexTypePropertyBuilder

要配置的属性的生成器。

seed
Int32

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

increment
Int32

添加到加载的前一行的标识值的增量值。

返回

同一生成器实例,以便可以链接多个调用。

注解

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

适用于

UseIdentityColumn(ComplexTypePropertyBuilder, Int64, Int32)

将 key 属性配置为在面向SQL Server时使用 SQL Server IDENTITY 功能为新实体生成值。 此方法将 属性设置为 OnAdd

public static Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexTypePropertyBuilder UseIdentityColumn (this Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexTypePropertyBuilder propertyBuilder, long seed = 1, int increment = 1);
static member UseIdentityColumn : Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexTypePropertyBuilder * int64 * int -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexTypePropertyBuilder
<Extension()>
Public Function UseIdentityColumn (propertyBuilder As ComplexTypePropertyBuilder, Optional seed As Long = 1, Optional increment As Integer = 1) As ComplexTypePropertyBuilder

参数

propertyBuilder
ComplexTypePropertyBuilder

要配置的属性的生成器。

seed
Int64

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

increment
Int32

添加到加载的前一行的标识值的增量值。

返回

同一生成器实例,以便可以链接多个调用。

注解

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

适用于

UseIdentityColumn<TProperty>(ComplexTypePropertyBuilder<TProperty>, Int32, Int32)

将 key 属性配置为在面向SQL Server时使用 SQL Server IDENTITY 功能为新实体生成值。 此方法将 属性设置为 OnAdd

public static Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexTypePropertyBuilder<TProperty> UseIdentityColumn<TProperty> (this Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexTypePropertyBuilder<TProperty> propertyBuilder, int seed, int increment = 1);
static member UseIdentityColumn : Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexTypePropertyBuilder<'Property> * int * int -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexTypePropertyBuilder<'Property>
<Extension()>
Public Function UseIdentityColumn(Of TProperty) (propertyBuilder As ComplexTypePropertyBuilder(Of TProperty), seed As Integer, Optional increment As Integer = 1) As ComplexTypePropertyBuilder(Of TProperty)

类型参数

TProperty

要配置的属性的类型。

参数

propertyBuilder
ComplexTypePropertyBuilder<TProperty>

要配置的属性的生成器。

seed
Int32

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

increment
Int32

添加到加载的前一行的标识值的增量值。

返回

同一生成器实例,以便可以链接多个调用。

注解

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

适用于

UseIdentityColumn<TProperty>(ComplexTypePropertyBuilder<TProperty>, Int64, Int32)

将 key 属性配置为在面向SQL Server时使用 SQL Server IDENTITY 功能为新实体生成值。 此方法将 属性设置为 OnAdd

public static Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexTypePropertyBuilder<TProperty> UseIdentityColumn<TProperty> (this Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexTypePropertyBuilder<TProperty> propertyBuilder, long seed = 1, int increment = 1);
static member UseIdentityColumn : Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexTypePropertyBuilder<'Property> * int64 * int -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexTypePropertyBuilder<'Property>
<Extension()>
Public Function UseIdentityColumn(Of TProperty) (propertyBuilder As ComplexTypePropertyBuilder(Of TProperty), Optional seed As Long = 1, Optional increment As Integer = 1) As ComplexTypePropertyBuilder(Of TProperty)

类型参数

TProperty

要配置的属性的类型。

参数

propertyBuilder
ComplexTypePropertyBuilder<TProperty>

要配置的属性的生成器。

seed
Int64

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

increment
Int32

添加到加载的前一行的标识值的增量值。

返回

同一生成器实例,以便可以链接多个调用。

注解

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

适用于