SqlServerModelBuilderExtensions.HasIdentityColumnSeed 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
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.
- 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.
- 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
Entity Framework