Прочетете на английски

Споделяне чрез


SqlServerPropertyExtensions.SetIdentitySeed Method

Definition

Overloads

SetIdentitySeed(IConventionProperty, Nullable<Int64>, StoreObjectIdentifier, Boolean)

Source:
SqlServerPropertyExtensions.cs
Source:
SqlServerPropertyExtensions.cs
Source:
SqlServerPropertyExtensions.cs

Sets the identity seed for a particular table.

C#
public static long? SetIdentitySeed (this Microsoft.EntityFrameworkCore.Metadata.IConventionProperty property, long? seed, in Microsoft.EntityFrameworkCore.Metadata.StoreObjectIdentifier storeObject, bool fromDataAnnotation = false);

Parameters

property
IConventionProperty

The property.

seed
Nullable<Int64>

The value to set.

storeObject
StoreObjectIdentifier

The identifier of the table containing the column.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

The configured value.

Applies to

Entity Framework Core 9.0 и други версии
Продукт Версии
Entity Framework Core 7.0, 8.0, 9.0

SetIdentitySeed(IMutableProperty, Nullable<Int64>, StoreObjectIdentifier)

Source:
SqlServerPropertyExtensions.cs
Source:
SqlServerPropertyExtensions.cs
Source:
SqlServerPropertyExtensions.cs

Sets the identity seed for a particular table.

C#
public static void SetIdentitySeed (this Microsoft.EntityFrameworkCore.Metadata.IMutableProperty property, long? seed, in Microsoft.EntityFrameworkCore.Metadata.StoreObjectIdentifier storeObject);

Parameters

property
IMutableProperty

The property.

seed
Nullable<Int64>

The value to set.

storeObject
StoreObjectIdentifier

The identifier of the table containing the column.

Applies to

Entity Framework Core 9.0 и други версии
Продукт Версии
Entity Framework Core 7.0, 8.0, 9.0

SetIdentitySeed(IConventionRelationalPropertyOverrides, Nullable<Int64>, Boolean)

Source:
SqlServerPropertyExtensions.cs
Source:
SqlServerPropertyExtensions.cs
Source:
SqlServerPropertyExtensions.cs

Sets the identity seed for a particular table.

C#
public static long? SetIdentitySeed (this Microsoft.EntityFrameworkCore.Metadata.IConventionRelationalPropertyOverrides overrides, long? seed, bool fromDataAnnotation = false);

Parameters

overrides
IConventionRelationalPropertyOverrides

The property overrides.

seed
Nullable<Int64>

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 и други версии
Продукт Версии
Entity Framework Core 7.0, 8.0, 9.0

SetIdentitySeed(IConventionProperty, Nullable<Int64>, Boolean)

Source:
SqlServerPropertyExtensions.cs
Source:
SqlServerPropertyExtensions.cs
Source:
SqlServerPropertyExtensions.cs
Source:
SqlServerPropertyExtensions.cs

Sets the identity seed.

C#
public static long? SetIdentitySeed (this Microsoft.EntityFrameworkCore.Metadata.IConventionProperty property, long? seed, bool fromDataAnnotation = false);

Parameters

property
IConventionProperty

The property.

seed
Nullable<Int64>

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 и други версии
Продукт Версии
Entity Framework Core 6.0, 7.0, 8.0, 9.0

SetIdentitySeed(IMutableProperty, Nullable<Int32>)

Source:
SqlServerPropertyExtensions.cs
Source:
SqlServerPropertyExtensions.cs
Source:
SqlServerPropertyExtensions.cs

Sets the identity seed.

C#
public static void SetIdentitySeed (this Microsoft.EntityFrameworkCore.Metadata.IMutableProperty property, int? seed);

Parameters

property
IMutableProperty

The property.

seed
Nullable<Int32>

The value to set.

Applies to

Entity Framework Core 5.0 и други версии
Продукт Версии
Entity Framework Core 3.0, 3.1, 5.0

SetIdentitySeed(IMutableRelationalPropertyOverrides, Nullable<Int64>)

Source:
SqlServerPropertyExtensions.cs
Source:
SqlServerPropertyExtensions.cs
Source:
SqlServerPropertyExtensions.cs

Sets the identity seed for a particular table.

C#
public static void SetIdentitySeed (this Microsoft.EntityFrameworkCore.Metadata.IMutableRelationalPropertyOverrides overrides, long? seed);

Parameters

overrides
IMutableRelationalPropertyOverrides

The property overrides.

seed
Nullable<Int64>

The value to set.

Applies to

Entity Framework Core 9.0 и други версии
Продукт Версии
Entity Framework Core 7.0, 8.0, 9.0

SetIdentitySeed(IMutableProperty, Nullable<Int64>)

Source:
SqlServerPropertyExtensions.cs
Source:
SqlServerPropertyExtensions.cs
Source:
SqlServerPropertyExtensions.cs
Source:
SqlServerPropertyExtensions.cs

Sets the identity seed.

C#
public static void SetIdentitySeed (this Microsoft.EntityFrameworkCore.Metadata.IMutableProperty property, long? seed);

Parameters

property
IMutableProperty

The property.

seed
Nullable<Int64>

The value to set.

Applies to

Entity Framework Core 9.0 и други версии
Продукт Версии
Entity Framework Core 6.0, 7.0, 8.0, 9.0

SetIdentitySeed(IConventionProperty, Nullable<Int32>, Boolean)

Source:
SqlServerPropertyExtensions.cs
Source:
SqlServerPropertyExtensions.cs
Source:
SqlServerPropertyExtensions.cs

Sets the identity seed.

C#
public static void SetIdentitySeed (this Microsoft.EntityFrameworkCore.Metadata.IConventionProperty property, int? seed, bool fromDataAnnotation = false);
C#
public static int? SetIdentitySeed (this Microsoft.EntityFrameworkCore.Metadata.IConventionProperty property, int? seed, bool fromDataAnnotation = false);

Parameters

property
IConventionProperty

The property.

seed
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 5.0 и други версии
Продукт Версии
Entity Framework Core 3.0, 3.1, 5.0