CascadeDeleteConvention Klasa

Definicja

Konwencja określająca zachowanie usuwania dla Cascade wymaganych kluczy obcych i ClientSetNull opcjonalnych.

public class CascadeDeleteConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyRequirednessChangedConvention
type CascadeDeleteConvention = class
    interface IForeignKeyAddedConvention
    interface IConvention
    interface IForeignKeyRequirednessChangedConvention
Public Class CascadeDeleteConvention
Implements IForeignKeyAddedConvention, IForeignKeyRequirednessChangedConvention
Dziedziczenie
CascadeDeleteConvention
Pochodne
Implementuje

Uwagi

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

Konstruktory

CascadeDeleteConvention(ProviderConventionSetBuilderDependencies)

Tworzy nowe wystąpienie klasy CascadeDeleteConvention.

Właściwości

Dependencies

Zależności dla tej usługi.

Metody

GetTargetDeleteBehavior(IConventionForeignKey)

Zwraca zachowanie usuwania ustawione dla danego klucza obcego.

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.

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

Wywoływana po zmianie wymaganego klucza obcego.

ProcessForeignKeyRequirednessChanged(IConventionRelationshipBuilder, IConventionContext<IConventionRelationshipBuilder>)

Wywoływana po zmianie wymaganego klucza obcego.

Dotyczy