Udostępnij za pośrednictwem


SqlServerModelBuilderExtensions.HasIdentityColumnSeed Metoda

Definicja

Przeciążenia

HasIdentityColumnSeed(IConventionModelBuilder, Nullable<Int32>, Boolean)

Konfiguruje domyślny inicjator SQL Server IDENTITY.

HasIdentityColumnSeed(IConventionModelBuilder, Nullable<Int64>, Boolean)

Konfiguruje domyślny inicjator SQL Server IDENTITY.

HasIdentityColumnSeed(IConventionModelBuilder, Nullable<Int32>, Boolean)

Konfiguruje domyślny inicjator 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

Parametry

modelBuilder
IConventionModelBuilder

Konstruktor modeli.

seed
Nullable<Int32>

Wartość używana dla pierwszego wiersza załadowanego do tabeli.

fromDataAnnotation
Boolean

Wskazuje, czy konfiguracja została określona przy użyciu adnotacji danych.

Zwraca

To samo wystąpienie konstruktora, jeśli konfiguracja została zastosowana, null w przeciwnym razie.

Dotyczy

HasIdentityColumnSeed(IConventionModelBuilder, Nullable<Int64>, Boolean)

Konfiguruje domyślny inicjator 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

Parametry

modelBuilder
IConventionModelBuilder

Konstruktor modeli.

seed
Nullable<Int64>

Wartość używana dla pierwszego wiersza załadowanego do tabeli.

fromDataAnnotation
Boolean

Wskazuje, czy konfiguracja została określona przy użyciu adnotacji danych.

Zwraca

To samo wystąpienie konstruktora, jeśli konfiguracja została zastosowana, null w przeciwnym razie.

Uwagi

Aby uzyskać więcej informacji, zobacz Modelowanie typów jednostek i relacji oraz Uzyskiwanie dostępu do baz danych SQL Server i Azure SQL za pomocą programu EF Core.

Dotyczy