Język

CosmosRelationshipDiscoveryConvention 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, który jest odpowiedni odwrotną nawigacją. Zakłada się, że wszystkie nawigacje są przeznaczone dla należących do niego typów jednostek dla usługi Cosmos.

[System.Runtime.CompilerServices.Nullable(0)]
public class CosmosRelationshipDiscoveryConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.RelationshipDiscoveryConvention
public class CosmosRelationshipDiscoveryConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.RelationshipDiscoveryConvention
[<System.Runtime.CompilerServices.Nullable(0)>]
type CosmosRelationshipDiscoveryConvention = class
    inherit RelationshipDiscoveryConvention
type CosmosRelationshipDiscoveryConvention = class
    inherit RelationshipDiscoveryConvention
Public Class CosmosRelationshipDiscoveryConvention
Inherits RelationshipDiscoveryConvention
Dziedziczenie
CosmosRelationshipDiscoveryConvention
Atrybuty

Uwagi

Aby uzyskać więcej informacji i przykłady, zobacz Konwencje tworzenia modeli i Uzyskiwanie dostępu do Azure Cosmos DB za pomocą programu EF Core.

Konstruktory

Nazwisko Opis
CosmosRelationshipDiscoveryConvention(ProviderConventionSetBuilderDependencies)

Tworzy nowe wystąpienie klasy RelationshipDiscoveryConvention.

Właściwości

Nazwisko Opis
Dependencies

Zależności dla tej usługi.

(Odziedziczone po RelationshipDiscoveryConvention)
UseAttributes

Wartość wskazująca, czy konwencja będzie używać atrybutów znalezionych na elementach członkowskich.

(Odziedziczone po RelationshipDiscoveryConvention)

Metody

Nazwisko Opis
DiscoverRelationships(IConventionEntityTypeBuilder, IConventionContext, Boolean)

Odnajduje relacje dla danego typu jednostki.

(Odziedziczone po RelationshipDiscoveryConvention)
ProcessEntityTypeAdded(IConventionEntityTypeBuilder, IConventionContext<IConventionEntityTypeBuilder>)

Wywoływana po dodaniu typu jednostki do modelu.

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

Wywoływana po zmianie typu podstawowego typu jednostki.

(Odziedziczone po RelationshipDiscoveryConvention)
ProcessEntityTypeIgnored(IConventionModelBuilder, String, Type, IConventionContext<String>)

Wywoływane po typie jednostki jest ignorowane.

(Odziedziczone po RelationshipDiscoveryConvention)
ProcessEntityTypeMemberIgnored(IConventionEntityTypeBuilder, String, IConventionContext<String>)

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

(Odziedziczone po RelationshipDiscoveryConvention)
ProcessForeignKeyNullNavigationSet(IConventionForeignKeyBuilder, Boolean, IConventionContext<IConventionNavigation>)

Wywoływana po ustawieniu nawigacji na null klucz obcy.

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

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

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

Wywoływana po usunięciu klucza obcego.

(Odziedziczone po RelationshipDiscoveryConvention)
ProcessNavigationAdded(IConventionNavigationBuilder, IConventionContext<IConventionNavigationBuilder>)

Wywoływana po dodaniu nawigacji do typu jednostki.

(Odziedziczone po RelationshipDiscoveryConvention)
ProcessNavigationRemoved(IConventionEntityTypeBuilder, IConventionEntityTypeBuilder, String, MemberInfo, IConventionContext<String>)

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

(Odziedziczone po RelationshipDiscoveryConvention)
ProcessTypeIgnored(IConventionModelBuilder, String, Type, IConventionContext<String>)

Wywoływane po typie jednostki jest ignorowane.

(Odziedziczone po RelationshipDiscoveryConvention)
ShouldBeOwned(Type, IConventionModel)

Zwraca wartość wskazującą, czy dany typ jednostki powinien zostać dodany jako należący, jeśli nie znajduje się obecnie w modelu.

ShouldBeOwnedType(Type, IConventionModel)

Zwraca wartość wskazującą, czy dany typ jednostki powinien zostać dodany jako należący, jeśli nie znajduje się 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.

(Odziedziczone po RelationshipDiscoveryConvention)

Dotyczy