Share via


SqlServerModelBuilderExtensions.HasIdentityColumnSeed Method

Definition

Overloads

HasIdentityColumnSeed(IConventionModelBuilder, Nullable<Int32>, Boolean)

Configures the default seed for SQL Server IDENTITY.

HasIdentityColumnSeed(IConventionModelBuilder, Nullable<Int64>, Boolean)

Configures the default seed for SQL Server IDENTITY.

HasIdentityColumnSeed(IConventionModelBuilder, Nullable<Int32>, Boolean)

Configures the default seed for SQL Server IDENTITY.

public static Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionModelBuilder HasIdentityColumnSeed (this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionModelBuilder modelBuilder, int? seed, bool fromDataAnnotation = false);
static member HasIdentityColumnSeed : Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionModelBuilder * Nullable<int> * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionModelBuilder
<Extension()>
Public Function HasIdentityColumnSeed (modelBuilder As IConventionModelBuilder, seed As Nullable(Of Integer), Optional fromDataAnnotation As Boolean = false) As IConventionModelBuilder

Parameters

modelBuilder
IConventionModelBuilder

The model builder.

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(IConventionModelBuilder, Nullable<Int64>, Boolean)

Configures the default seed for SQL Server IDENTITY.

public static Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionModelBuilder? HasIdentityColumnSeed (this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionModelBuilder modelBuilder, long? seed, bool fromDataAnnotation = false);
static member HasIdentityColumnSeed : Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionModelBuilder * Nullable<int64> * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionModelBuilder
<Extension()>
Public Function HasIdentityColumnSeed (modelBuilder As IConventionModelBuilder, seed As Nullable(Of Long), Optional fromDataAnnotation As Boolean = false) As IConventionModelBuilder

Parameters

modelBuilder
IConventionModelBuilder

The model builder.

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