SqlServerValueGenerationConvention Klasa

Definicja

Konwencja, która konfiguruje generowanie wartości magazynu jako OnAdd właściwości będących częścią klucza podstawowego, a nie część żadnych kluczy obcych, została skonfigurowana tak, aby miała wartość domyślną bazy danych lub została skonfigurowana do używania SqlServerValueGenerationStrategyelementu . Konfiguruje również właściwości tak, jakby OnAddOrUpdate zostały skonfigurowane jako kolumny obliczeniowe.

public class SqlServerValueGenerationConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.RelationalValueGenerationConvention
type SqlServerValueGenerationConvention = class
    inherit RelationalValueGenerationConvention
Public Class SqlServerValueGenerationConvention
Inherits RelationalValueGenerationConvention
Dziedziczenie

Uwagi

Aby uzyskać więcej informacji, zobacz Konwencje tworzenia modeli oraz Uzyskiwanie dostępu do baz danych SQL Server i Azure SQL za pomocą platformy EF Core.

Konstruktory

SqlServerValueGenerationConvention(ProviderConventionSetBuilderDependencies, RelationalConventionSetBuilderDependencies)

Tworzy nowe wystąpienie klasy SqlServerValueGenerationConvention.

Właściwości

Dependencies

Zależności dla tej usługi.

(Odziedziczone po ValueGenerationConvention)
RelationalDependencies

Zależności specyficzne dla dostawcy relacyjnego dla tej usługi.

(Odziedziczone po RelationalValueGenerationConvention)

Metody

GetValueGenerated(IConventionProperty)

Zwraca strategię generowania wartości magazynu, która ma zostać ustawiona dla danej właściwości.

GetValueGenerated(IProperty)

Zwraca strategię generowania wartości magazynu, która ma zostać ustawiona dla danej właściwości.

GetValueGenerated(IProperty, StoreObjectIdentifier)

Zwraca strategię generowania wartości magazynu, która ma zostać ustawiona dla danej właściwości.

GetValueGenerated(IReadOnlyProperty, StoreObjectIdentifier)

Zwraca strategię generowania wartości magazynu, która ma zostać ustawiona dla danej właściwości.

MappingStrategyAllowsValueGeneration(IConventionProperty, String)

Sprawdza, czy strategia mapowania i właściwość zezwalają na generowanie wartości według konwencji.

(Odziedziczone po RelationalValueGenerationConvention)
ProcessEntityTypeAnnotationChanged(IConventionEntityTypeBuilder, String, IConventionAnnotation, IConventionAnnotation, IConventionContext<IConventionAnnotation>)

Wywoływana po zmianie adnotacji w jednostce.

ProcessEntityTypeAnnotationChanged(IConventionEntityTypeBuilder, String, IConventionAnnotation, IConventionAnnotation, IConventionContext<IConventionAnnotation>)

Wywoływana po zmianie adnotacji w typie jednostki.

(Odziedziczone po RelationalValueGenerationConvention)
ProcessEntityTypeBaseTypeChanged(IConventionEntityTypeBuilder, IConventionEntityType, IConventionEntityType, IConventionContext<IConventionEntityType>)

Wywoływane po zmianie typu podstawowego typu jednostki.

(Odziedziczone po ValueGenerationConvention)
ProcessEntityTypePrimaryKeyChanged(IConventionEntityTypeBuilder, IConventionKey, IConventionKey, IConventionContext<IConventionKey>)

Wywoływana po zmianie klucza podstawowego dla typu jednostki.

(Odziedziczone po ValueGenerationConvention)
ProcessForeignKeyAdded(IConventionForeignKeyBuilder, IConventionContext<IConventionForeignKeyBuilder>)

Wywoływane po dodaniu klucza obcego do typu jednostki.

(Odziedziczone po ValueGenerationConvention)
ProcessForeignKeyAdded(IConventionRelationshipBuilder, IConventionContext<IConventionRelationshipBuilder>)

Wywoływane po dodaniu klucza obcego do typu jednostki.

(Odziedziczone po ValueGenerationConvention)
ProcessForeignKeyOwnershipChanged(IConventionForeignKeyBuilder, IConventionContext<Nullable<Boolean>>)

Wywoływana po zmianie wartości własności klucza obcego.

(Odziedziczone po ValueGenerationConvention)
ProcessForeignKeyPropertiesChanged(IConventionForeignKeyBuilder, IReadOnlyList<IConventionProperty>, IConventionKey, IConventionContext<IReadOnlyList<IConventionProperty>>)

Wywoływane po zmianie właściwości klucza obcego lub klucza głównego.

(Odziedziczone po ValueGenerationConvention)
ProcessForeignKeyPropertiesChanged(IConventionRelationshipBuilder, IReadOnlyList<IConventionProperty>, IConventionKey, IConventionContext<IConventionRelationshipBuilder>)

Wywoływane po zmianie właściwości klucza obcego lub klucza głównego.

(Odziedziczone po ValueGenerationConvention)
ProcessForeignKeyRemoved(IConventionEntityTypeBuilder, IConventionForeignKey, IConventionContext<IConventionForeignKey>)

Wywoływane po usunięciu klucza obcego.

(Odziedziczone po ValueGenerationConvention)
ProcessPropertyAnnotationChanged(IConventionPropertyBuilder, String, IConventionAnnotation, IConventionAnnotation, IConventionContext<IConventionAnnotation>)

Wywoływana po zmianie adnotacji we właściwości.

Dotyczy