RelationshipDiscoveryConvention Klasa

Definicja

Konwencja, która konfiguruje relacje między typami jednostek na podstawie właściwości nawigacji, o ile nie ma wątpliwości co do tego, do którego jest odpowiedni odwrotna nawigacja.

public class RelationshipDiscoveryConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeBaseTypeChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeIgnoredConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeMemberIgnoredConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyOwnershipChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.INavigationAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.INavigationRemovedConvention
public class RelationshipDiscoveryConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeBaseTypeChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeIgnoredConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeMemberIgnoredConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyNullNavigationSetConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyOwnershipChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyRemovedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.INavigationAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.INavigationRemovedConvention
public class RelationshipDiscoveryConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeBaseTypeChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeMemberIgnoredConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyNullNavigationSetConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyOwnershipChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyRemovedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.INavigationAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.INavigationRemovedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.ITypeIgnoredConvention
type RelationshipDiscoveryConvention = class
    interface IEntityTypeAddedConvention
    interface IConvention
    interface IEntityTypeIgnoredConvention
    interface IEntityTypeBaseTypeChangedConvention
    interface INavigationRemovedConvention
    interface IEntityTypeMemberIgnoredConvention
    interface INavigationAddedConvention
    interface IForeignKeyOwnershipChangedConvention
type RelationshipDiscoveryConvention = class
    interface IEntityTypeAddedConvention
    interface IConvention
    interface IEntityTypeIgnoredConvention
    interface IEntityTypeBaseTypeChangedConvention
    interface IEntityTypeMemberIgnoredConvention
    interface INavigationRemovedConvention
    interface INavigationAddedConvention
    interface IForeignKeyOwnershipChangedConvention
type RelationshipDiscoveryConvention = class
    interface IEntityTypeAddedConvention
    interface IConvention
    interface IEntityTypeIgnoredConvention
    interface IEntityTypeBaseTypeChangedConvention
    interface IEntityTypeMemberIgnoredConvention
    interface INavigationRemovedConvention
    interface INavigationAddedConvention
    interface IForeignKeyOwnershipChangedConvention
    interface IForeignKeyNullNavigationSetConvention
    interface IForeignKeyRemovedConvention
type RelationshipDiscoveryConvention = class
    interface ITypeIgnoredConvention
    interface IConvention
    interface IEntityTypeAddedConvention
    interface IEntityTypeBaseTypeChangedConvention
    interface IEntityTypeMemberIgnoredConvention
    interface INavigationRemovedConvention
    interface INavigationAddedConvention
    interface IForeignKeyOwnershipChangedConvention
    interface IForeignKeyNullNavigationSetConvention
    interface IForeignKeyRemovedConvention
Public Class RelationshipDiscoveryConvention
Implements IEntityTypeAddedConvention, IEntityTypeBaseTypeChangedConvention, IEntityTypeIgnoredConvention, IEntityTypeMemberIgnoredConvention, IForeignKeyOwnershipChangedConvention, INavigationAddedConvention, INavigationRemovedConvention
Public Class RelationshipDiscoveryConvention
Implements IEntityTypeAddedConvention, IEntityTypeBaseTypeChangedConvention, IEntityTypeIgnoredConvention, IEntityTypeMemberIgnoredConvention, IForeignKeyNullNavigationSetConvention, IForeignKeyOwnershipChangedConvention, IForeignKeyRemovedConvention, INavigationAddedConvention, INavigationRemovedConvention
Public Class RelationshipDiscoveryConvention
Implements IEntityTypeAddedConvention, IEntityTypeBaseTypeChangedConvention, IEntityTypeMemberIgnoredConvention, IForeignKeyNullNavigationSetConvention, IForeignKeyOwnershipChangedConvention, IForeignKeyRemovedConvention, INavigationAddedConvention, INavigationRemovedConvention, ITypeIgnoredConvention
Dziedziczenie
RelationshipDiscoveryConvention
Pochodne
Implementuje

Uwagi

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

Konstruktory

RelationshipDiscoveryConvention(ProviderConventionSetBuilderDependencies)

Tworzy nowe wystąpienie klasy RelationshipDiscoveryConvention.

Właściwości

Dependencies

Zależności dla tej usługi.

Metody

ProcessEntityTypeAdded(IConventionEntityTypeBuilder, IConventionContext<IConventionEntityTypeBuilder>)

Wywoływane po dodaniu typu jednostki do modelu.

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

Wywoływane po zmianie typu podstawowego typu jednostki.

ProcessEntityTypeIgnored(IConventionModelBuilder, String, Type, IConventionContext<String>)

Wywoływane po zignorowaniu typu jednostki.

ProcessEntityTypeMemberIgnored(IConventionEntityTypeBuilder, String, IConventionContext<String>)

Wywoływane po zignorowaniu elementu członkowskiego typu jednostki.

ProcessForeignKeyNullNavigationSet(IConventionForeignKeyBuilder, Boolean, IConventionContext<IConventionNavigation>)

Wywoływane po ustawieniu nawigacji na null klucz obcy.

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

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

ProcessForeignKeyOwnershipChanged(IConventionRelationshipBuilder, IConventionContext<IConventionRelationshipBuilder>)

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

ProcessForeignKeyRemoved(IConventionEntityTypeBuilder, IConventionForeignKey, IConventionContext<IConventionForeignKey>)

Wywoływane po usunięciu klucza obcego.

ProcessNavigationAdded(IConventionNavigationBuilder, IConventionContext<IConventionNavigationBuilder>)

Wywoływane po dodaniu nawigacji do typu jednostki.

ProcessNavigationAdded(IConventionRelationshipBuilder, IConventionNavigation, IConventionContext<IConventionNavigation>)

Wywoływane po dodaniu nawigacji do typu jednostki.

ProcessNavigationRemoved(IConventionEntityTypeBuilder, IConventionEntityTypeBuilder, String, MemberInfo, IConventionContext<String>)

Wywoływane po usunięciu nawigacji z typu jednostki.

ProcessTypeIgnored(IConventionModelBuilder, String, Type, IConventionContext<String>)

Wywoływane po zignorowaniu typu jednostki.

ShouldBeOwned(Type, IConventionModel)

Zwraca wartość wskazującą, czy dany typ jednostki powinien zostać dodany jako właściciel, jeśli nie jest obecnie w modelu.

TryGetTargetEntityTypeBuilder(IConventionEntityTypeBuilder, Type, MemberInfo, Nullable<Boolean>, Boolean)

Znajduje lub próbuje utworzyć element docelowy typu jednostki dla danego elementu członkowskiego nawigacji.

Dotyczy