Share via


SqlitePropertyBuilderExtensions.UseAutoincrement Method

Definition

Overloads

Name Description
UseAutoincrement(ColumnBuilder)

Configures the property to use SQLite AUTOINCREMENT feature to generate values for new entities, when targeting SQLite. This method sets the property to be OnAdd.

UseAutoincrement(PropertyBuilder)

Configures the property to use SQLite AUTOINCREMENT feature to generate values for new entities, when targeting SQLite. This method sets the property to be OnAdd.

UseAutoincrement<TProperty>(PropertyBuilder<TProperty>)

Configures the property to use SQLite AUTOINCREMENT feature to generate values for new entities, when targeting SQLite. This method sets the property to be OnAdd.

UseAutoincrement(ColumnBuilder)

Source:
SqlitePropertyBuilderExtensions.cs

Configures the property to use SQLite AUTOINCREMENT feature to generate values for new entities, when targeting SQLite. This method sets the property to be OnAdd.

public static Microsoft.EntityFrameworkCore.Metadata.Builders.ColumnBuilder UseAutoincrement(this Microsoft.EntityFrameworkCore.Metadata.Builders.ColumnBuilder columnBuilder);
static member UseAutoincrement : Microsoft.EntityFrameworkCore.Metadata.Builders.ColumnBuilder -> Microsoft.EntityFrameworkCore.Metadata.Builders.ColumnBuilder
<Extension()>
Public Function UseAutoincrement (columnBuilder As ColumnBuilder) As ColumnBuilder

Parameters

columnBuilder
ColumnBuilder

The builder for the column being configured.

Returns

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

Remarks

AUTOINCREMENT can only be used on integer primary key columns in SQLite. See Modeling entity types and relationships, and Accessing SQLite databases with EF Core for more information and examples.

Applies to

UseAutoincrement(PropertyBuilder)

Source:
SqlitePropertyBuilderExtensions.cs

Configures the property to use SQLite AUTOINCREMENT feature to generate values for new entities, when targeting SQLite. This method sets the property to be OnAdd.

public static Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder UseAutoincrement(this Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder propertyBuilder);
static member UseAutoincrement : Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder -> Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder
<Extension()>
Public Function UseAutoincrement (propertyBuilder As PropertyBuilder) As PropertyBuilder

Parameters

propertyBuilder
PropertyBuilder

The builder for the property being configured.

Returns

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

Remarks

AUTOINCREMENT can only be used on integer primary key columns in SQLite. See Modeling entity types and relationships, and Accessing SQLite databases with EF Core for more information and examples.

Applies to

UseAutoincrement<TProperty>(PropertyBuilder<TProperty>)

Source:
SqlitePropertyBuilderExtensions.cs

Configures the property to use SQLite AUTOINCREMENT feature to generate values for new entities, when targeting SQLite. This method sets the property to be OnAdd.

public static Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<TProperty> UseAutoincrement<TProperty>(this Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<TProperty> propertyBuilder);
static member UseAutoincrement : Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<'Property> -> Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<'Property>
<Extension()>
Public Function UseAutoincrement(Of TProperty) (propertyBuilder As PropertyBuilder(Of TProperty)) 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.

Returns

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

Remarks

AUTOINCREMENT can only be used on integer primary key columns in SQLite. See Modeling entity types and relationships, and Accessing SQLite databases with EF Core for more information and examples.

Applies to