Share via


SqlServerComplexTypePropertyBuilderExtensions.UseIdentityColumn Method

Definition

Overloads

UseIdentityColumn(ComplexTypePropertyBuilder, Int32, Int32)

Configures the key property to use the SQL Server IDENTITY feature to generate values for new entities, when targeting SQL Server. This method sets the property to be OnAdd.

UseIdentityColumn(ComplexTypePropertyBuilder, Int64, Int32)

Configures the key property to use the SQL Server IDENTITY feature to generate values for new entities, when targeting SQL Server. This method sets the property to be OnAdd.

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

Configures the key property to use the SQL Server IDENTITY feature to generate values for new entities, when targeting SQL Server. This method sets the property to be OnAdd.

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

Configures the key property to use the SQL Server IDENTITY feature to generate values for new entities, when targeting SQL Server. This method sets the property to be OnAdd.

UseIdentityColumn(ComplexTypePropertyBuilder, Int32, Int32)

Configures the key property to use the SQL Server IDENTITY feature to generate values for new entities, when targeting SQL Server. This method sets the property to be 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

Parameters

propertyBuilder
ComplexTypePropertyBuilder

The builder for the property being configured.

seed
Int32

The value that is used for the very first row loaded into the table.

increment
Int32

The incremental value that is added to the identity value of the previous row that was loaded.

Returns

The same builder instance so that multiple calls can be chained.

Remarks

See Modeling entity types and relationships, and Accessing SQL Server and Azure SQL databases with EF Core for more information and examples.

Applies to

UseIdentityColumn(ComplexTypePropertyBuilder, Int64, Int32)

Configures the key property to use the SQL Server IDENTITY feature to generate values for new entities, when targeting SQL Server. This method sets the property to be 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

Parameters

propertyBuilder
ComplexTypePropertyBuilder

The builder for the property being configured.

seed
Int64

The value that is used for the very first row loaded into the table.

increment
Int32

The incremental value that is added to the identity value of the previous row that was loaded.

Returns

The same builder instance so that multiple calls can be chained.

Remarks

See Modeling entity types and relationships, and Accessing SQL Server and Azure SQL databases with EF Core for more information and examples.

Applies to

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

Configures the key property to use the SQL Server IDENTITY feature to generate values for new entities, when targeting SQL Server. This method sets the property to be 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)

Type Parameters

TProperty

The type of the property being configured.

Parameters

propertyBuilder
ComplexTypePropertyBuilder<TProperty>

The builder for the property being configured.

seed
Int32

The value that is used for the very first row loaded into the table.

increment
Int32

The incremental value that is added to the identity value of the previous row that was loaded.

Returns

The same builder instance so that multiple calls can be chained.

Remarks

See Modeling entity types and relationships, and Accessing SQL Server and Azure SQL databases with EF Core for more information and examples.

Applies to

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

Configures the key property to use the SQL Server IDENTITY feature to generate values for new entities, when targeting SQL Server. This method sets the property to be 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)

Type Parameters

TProperty

The type of the property being configured.

Parameters

propertyBuilder
ComplexTypePropertyBuilder<TProperty>

The builder for the property being configured.

seed
Int64

The value that is used for the very first row loaded into the table.

increment
Int32

The incremental value that is added to the identity value of the previous row that was loaded.

Returns

The same builder instance so that multiple calls can be chained.

Remarks

See Modeling entity types and relationships, and Accessing SQL Server and Azure SQL databases with EF Core for more information and examples.

Applies to