RelationalValueGenerationConvention Klasa

Definicja

Konwencja, która konfiguruje generowanie wartości jako OnAdd właściwości, które są częścią klucza podstawowego, a nie część żadnych kluczy obcych lub zostały skonfigurowane do posiadania wartości domyślnej bazy danych. Konfiguruje również właściwości tak, jakby OnAddOrUpdate zostały skonfigurowane jako kolumny obliczeniowe.

public class RelationalValueGenerationConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.ValueGenerationConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IPropertyAnnotationChangedConvention
public class RelationalValueGenerationConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.ValueGenerationConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAnnotationChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IPropertyAnnotationChangedConvention
type RelationalValueGenerationConvention = class
    inherit ValueGenerationConvention
    interface IPropertyAnnotationChangedConvention
    interface IConvention
type RelationalValueGenerationConvention = class
    inherit ValueGenerationConvention
    interface IPropertyAnnotationChangedConvention
    interface IConvention
    interface IEntityTypeAnnotationChangedConvention
Public Class RelationalValueGenerationConvention
Inherits ValueGenerationConvention
Implements IPropertyAnnotationChangedConvention
Public Class RelationalValueGenerationConvention
Inherits ValueGenerationConvention
Implements IEntityTypeAnnotationChangedConvention, IPropertyAnnotationChangedConvention
Dziedziczenie
RelationalValueGenerationConvention
Pochodne
Implementuje

Uwagi

Aby uzyskać więcej informacji i przykładów, zobacz Konwencje tworzenia modeli i generowanie wartości platformy EF Core .

Konstruktory

RelationalValueGenerationConvention(ProviderConventionSetBuilderDependencies, RelationalConventionSetBuilderDependencies)

Tworzy nowe wystąpienie klasy RelationalValueGenerationConvention.

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.

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.

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

Wywoływana po zmianie adnotacji w typie jednostki.

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