ValueGenerationConvention Klasa

Definicja

Konwencja, która konfiguruje generowanie OnAdd wartości jako właściwości będące częścią klucza podstawowego, a nie część kluczy obcych.

public class ValueGenerationConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeBaseTypeChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypePrimaryKeyChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyPropertiesChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyRemovedConvention
public class ValueGenerationConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeBaseTypeChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypePrimaryKeyChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyOwnershipChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyPropertiesChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyRemovedConvention
type ValueGenerationConvention = class
    interface IEntityTypePrimaryKeyChangedConvention
    interface IConvention
    interface IForeignKeyAddedConvention
    interface IForeignKeyRemovedConvention
    interface IForeignKeyPropertiesChangedConvention
    interface IEntityTypeBaseTypeChangedConvention
type ValueGenerationConvention = class
    interface IEntityTypePrimaryKeyChangedConvention
    interface IConvention
    interface IForeignKeyAddedConvention
    interface IForeignKeyRemovedConvention
    interface IForeignKeyPropertiesChangedConvention
    interface IEntityTypeBaseTypeChangedConvention
    interface IForeignKeyOwnershipChangedConvention
Public Class ValueGenerationConvention
Implements IEntityTypeBaseTypeChangedConvention, IEntityTypePrimaryKeyChangedConvention, IForeignKeyAddedConvention, IForeignKeyPropertiesChangedConvention, IForeignKeyRemovedConvention
Public Class ValueGenerationConvention
Implements IEntityTypeBaseTypeChangedConvention, IEntityTypePrimaryKeyChangedConvention, IForeignKeyAddedConvention, IForeignKeyOwnershipChangedConvention, IForeignKeyPropertiesChangedConvention, IForeignKeyRemovedConvention
Dziedziczenie
ValueGenerationConvention
Pochodne
Implementuje

Uwagi

Aby uzyskać więcej informacji i przykłady, zobacz Konwencje tworzenia modeli .

Konstruktory

ValueGenerationConvention(ProviderConventionSetBuilderDependencies)

Tworzy nowe wystąpienie klasy ValueGenerationConvention.

Właściwości

Dependencies

Zależności dla tej usługi.

Metody

GetValueGenerated(IConventionProperty)

Zwraca strategię generowania wartości sklepu ustawioną dla danej właściwości.

GetValueGenerated(IProperty)

Zwraca strategię generowania wartości sklepu ustawioną dla danej właściwości.

GetValueGenerated(IReadOnlyProperty)

Zwraca strategię generowania wartości sklepu ustawioną dla danej właściwości.

ProcessEntityTypeBaseTypeChanged(IConventionEntityTypeBuilder, IConventionEntityType, IConventionEntityType, IConventionContext<IConventionEntityType>)

Wywoływane po zmianie typu podstawowego typu jednostki.

ProcessEntityTypePrimaryKeyChanged(IConventionEntityTypeBuilder, IConventionKey, IConventionKey, IConventionContext<IConventionKey>)

Wywoływana po zmianie klucza podstawowego dla typu jednostki.

ProcessForeignKeyAdded(IConventionForeignKeyBuilder, IConventionContext<IConventionForeignKeyBuilder>)

Wywoływane po dodaniu klucza obcego do typu jednostki.

ProcessForeignKeyAdded(IConventionRelationshipBuilder, IConventionContext<IConventionRelationshipBuilder>)

Wywoływane po dodaniu klucza obcego do typu jednostki.

ProcessForeignKeyOwnershipChanged(IConventionForeignKeyBuilder, IConventionContext<Nullable<Boolean>>)

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

ProcessForeignKeyPropertiesChanged(IConventionForeignKeyBuilder, IReadOnlyList<IConventionProperty>, IConventionKey, IConventionContext<IReadOnlyList<IConventionProperty>>)

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

ProcessForeignKeyPropertiesChanged(IConventionRelationshipBuilder, IReadOnlyList<IConventionProperty>, IConventionKey, IConventionContext<IConventionRelationshipBuilder>)

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

ProcessForeignKeyRemoved(IConventionEntityTypeBuilder, IConventionForeignKey, IConventionContext<IConventionForeignKey>)

Wywoływane po usunięciu klucza obcego.

Dotyczy