SqlServerPropertyBuilderExtensions.UseIdentityColumn Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
UseIdentityColumn(ColumnBuilder, Int64, Int32) |
Configures the key column 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(PropertyBuilder, 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(PropertyBuilder, 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>(ColumnBuilder<TProperty>, Int64, Int32) |
Configures the key column 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>(PropertyBuilder<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>(PropertyBuilder<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(ColumnBuilder, Int64, Int32)
Configures the key column 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.ColumnBuilder UseIdentityColumn (this Microsoft.EntityFrameworkCore.Metadata.Builders.ColumnBuilder columnBuilder, long seed = 1, int increment = 1);
static member UseIdentityColumn : Microsoft.EntityFrameworkCore.Metadata.Builders.ColumnBuilder * int64 * int -> Microsoft.EntityFrameworkCore.Metadata.Builders.ColumnBuilder
<Extension()>
Public Function UseIdentityColumn (columnBuilder As ColumnBuilder, Optional seed As Long = 1, Optional increment As Integer = 1) As ColumnBuilder
Parameters
- columnBuilder
- ColumnBuilder
The builder for the column 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(PropertyBuilder, 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.PropertyBuilder UseIdentityColumn (this Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder propertyBuilder, int seed = 1, int increment = 1);
public static Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder UseIdentityColumn (this Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder propertyBuilder, int seed, int increment = 1);
static member UseIdentityColumn : Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder * int * int -> Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder
<Extension()>
Public Function UseIdentityColumn (propertyBuilder As PropertyBuilder, Optional seed As Integer = 1, Optional increment As Integer = 1) As PropertyBuilder
<Extension()>
Public Function UseIdentityColumn (propertyBuilder As PropertyBuilder, seed As Integer, Optional increment As Integer = 1) As PropertyBuilder
Parameters
- propertyBuilder
- PropertyBuilder
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(PropertyBuilder, 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.PropertyBuilder UseIdentityColumn (this Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder propertyBuilder, long seed = 1, int increment = 1);
static member UseIdentityColumn : Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder * int64 * int -> Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder
<Extension()>
Public Function UseIdentityColumn (propertyBuilder As PropertyBuilder, Optional seed As Long = 1, Optional increment As Integer = 1) As PropertyBuilder
Parameters
- propertyBuilder
- PropertyBuilder
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>(ColumnBuilder<TProperty>, Int64, Int32)
Configures the key column 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.ColumnBuilder<TProperty> UseIdentityColumn<TProperty> (this Microsoft.EntityFrameworkCore.Metadata.Builders.ColumnBuilder<TProperty> columnBuilder, long seed = 1, int increment = 1);
static member UseIdentityColumn : Microsoft.EntityFrameworkCore.Metadata.Builders.ColumnBuilder<'Property> * int64 * int -> Microsoft.EntityFrameworkCore.Metadata.Builders.ColumnBuilder<'Property>
<Extension()>
Public Function UseIdentityColumn(Of TProperty) (columnBuilder As ColumnBuilder(Of TProperty), Optional seed As Long = 1, Optional increment As Integer = 1) As ColumnBuilder(Of TProperty)
Type Parameters
- TProperty
The type of the property being configured.
Parameters
- columnBuilder
- ColumnBuilder<TProperty>
The builder for the column 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>(PropertyBuilder<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.PropertyBuilder<TProperty> UseIdentityColumn<TProperty> (this Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<TProperty> propertyBuilder, int seed = 1, int increment = 1);
public static Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<TProperty> UseIdentityColumn<TProperty> (this Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<TProperty> propertyBuilder, int seed, int increment = 1);
static member UseIdentityColumn : Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<'Property> * int * int -> Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<'Property>
<Extension()>
Public Function UseIdentityColumn(Of TProperty) (propertyBuilder As PropertyBuilder(Of TProperty), Optional seed As Integer = 1, Optional increment As Integer = 1) As PropertyBuilder(Of TProperty)
<Extension()>
Public Function UseIdentityColumn(Of TProperty) (propertyBuilder As PropertyBuilder(Of TProperty), seed As Integer, Optional increment As Integer = 1) As PropertyBuilder(Of TProperty)
Type Parameters
- TProperty
The type of the property being configured.
Parameters
- propertyBuilder
- PropertyBuilder<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>(PropertyBuilder<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.PropertyBuilder<TProperty> UseIdentityColumn<TProperty> (this Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<TProperty> propertyBuilder, long seed = 1, int increment = 1);
static member UseIdentityColumn : Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<'Property> * int64 * int -> Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<'Property>
<Extension()>
Public Function UseIdentityColumn(Of TProperty) (propertyBuilder As PropertyBuilder(Of TProperty), Optional seed As Long = 1, Optional increment As Integer = 1) As PropertyBuilder(Of TProperty)
Type Parameters
- TProperty
The type of the property being configured.
Parameters
- propertyBuilder
- PropertyBuilder<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
Entity Framework