SqlServerPropertyBuilderExtensions.HasIdentityColumnSeed Method

Definition

Overloads

HasIdentityColumnSeed(IConventionPropertyBuilder, Nullable<Int32>, Boolean)

Configures the seed for SQL Server IDENTITY.

HasIdentityColumnSeed(IConventionPropertyBuilder, Nullable<Int64>, Boolean)

Configures the seed for SQL Server IDENTITY.

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

Configures the seed for SQL Server IDENTITY for a particular table.

HasIdentityColumnSeed(IConventionPropertyBuilder, Nullable<Int32>, Boolean)

Configures the seed for 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

Parameters

propertyBuilder
IConventionPropertyBuilder

The builder for the property being configured.

seed
Nullable<Int32>

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

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

The same builder instance if the configuration was applied, null otherwise.

Applies to

HasIdentityColumnSeed(IConventionPropertyBuilder, Nullable<Int64>, Boolean)

Configures the seed for 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

Parameters

propertyBuilder
IConventionPropertyBuilder

The builder for the property being configured.

seed
Nullable<Int64>

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

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

The same builder instance if the configuration was applied, null otherwise.

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

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

Configures the seed for SQL Server IDENTITY for a particular table.

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

Parameters

propertyBuilder
IConventionPropertyBuilder

The builder for the property being configured.

seed
Nullable<Int64>

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

storeObject
StoreObjectIdentifier

The table identifier.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

The same builder instance if the configuration was applied, null otherwise.

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