SqlServerModelExtensions.SetIdentityIncrement Method

Definition

Overloads

SetIdentityIncrement(IConventionModel, Nullable<Int32>, Boolean)

Source:
SqlServerModelExtensions.cs
Source:
SqlServerModelExtensions.cs
Source:
SqlServerModelExtensions.cs
Source:
SqlServerModelExtensions.cs
Source:
SqlServerModelExtensions.cs
Source:
SqlServerModelExtensions.cs
Source:
SqlServerModelExtensions.cs

Sets the default identity increment.

C#
public static void SetIdentityIncrement (this Microsoft.EntityFrameworkCore.Metadata.IConventionModel model, int? increment, bool fromDataAnnotation = false);
C#
public static int? SetIdentityIncrement (this Microsoft.EntityFrameworkCore.Metadata.IConventionModel model, int? increment, bool fromDataAnnotation = false);

Parameters

model
IConventionModel

The model.

increment
Nullable<Int32>

The value to set.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

The configured value.

Applies to

Entity Framework Core 9.0 och andra versioner
Produkt Versioner
Entity Framework Core 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0

SetIdentityIncrement(IMutableModel, Nullable<Int32>)

Source:
SqlServerModelExtensions.cs
Source:
SqlServerModelExtensions.cs
Source:
SqlServerModelExtensions.cs
Source:
SqlServerModelExtensions.cs
Source:
SqlServerModelExtensions.cs
Source:
SqlServerModelExtensions.cs
Source:
SqlServerModelExtensions.cs

Sets the default identity increment.

C#
public static void SetIdentityIncrement (this Microsoft.EntityFrameworkCore.Metadata.IMutableModel model, int? increment);

Parameters

model
IMutableModel

The model.

increment
Nullable<Int32>

The value to set.

Applies to

Entity Framework Core 9.0 och andra versioner
Produkt Versioner
Entity Framework Core 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0