Condividi tramite


RelationshipDiscoveryConvention Classe

Definizione

Convenzione che configura le relazioni tra i tipi di entità in base alle proprietà di navigazione, purché non vi sia ambiguità per quanto riguarda la struttura di spostamento inversa corrispondente.

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
Ereditarietà
RelationshipDiscoveryConvention
Derivato
Implementazioni

Commenti

Per altre informazioni ed esempi, vedere Convenzioni di compilazione di modelli.

Costruttori

RelationshipDiscoveryConvention(ProviderConventionSetBuilderDependencies)

Crea una nuova istanza di RelationshipDiscoveryConvention.

Proprietà

Dependencies

Dipendenze per questo servizio.

Metodi

ProcessEntityTypeAdded(IConventionEntityTypeBuilder, IConventionContext<IConventionEntityTypeBuilder>)

Chiamato dopo l'aggiunta di un tipo di entità al modello.

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

Chiamato dopo la modifica del tipo di base di un tipo di entità.

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

Chiamato dopo che un tipo di entità viene ignorato.

ProcessEntityTypeMemberIgnored(IConventionEntityTypeBuilder, String, IConventionContext<String>)

Chiamato dopo che un membro del tipo di entità viene ignorato.

ProcessForeignKeyNullNavigationSet(IConventionForeignKeyBuilder, Boolean, IConventionContext<IConventionNavigation>)

Chiamato dopo l'impostazione null di uno spostamento su su una chiave esterna.

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

Chiamato dopo la modifica del valore di proprietà per una chiave esterna.

ProcessForeignKeyOwnershipChanged(IConventionRelationshipBuilder, IConventionContext<IConventionRelationshipBuilder>)

Chiamato dopo la modifica del valore di proprietà per una chiave esterna.

ProcessForeignKeyRemoved(IConventionEntityTypeBuilder, IConventionForeignKey, IConventionContext<IConventionForeignKey>)

Chiamato dopo la rimozione di una chiave esterna.

ProcessNavigationAdded(IConventionNavigationBuilder, IConventionContext<IConventionNavigationBuilder>)

Chiamato dopo l'aggiunta di uno spostamento al tipo di entità.

ProcessNavigationAdded(IConventionRelationshipBuilder, IConventionNavigation, IConventionContext<IConventionNavigation>)

Chiamato dopo l'aggiunta di uno spostamento al tipo di entità.

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

Chiamato dopo la rimozione di uno spostamento dal tipo di entità.

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

Chiamato dopo che un tipo di entità viene ignorato.

ShouldBeOwned(Type, IConventionModel)

Restituisce un valore che indica se il tipo di entità specificato deve essere aggiunto come di proprietà se non è attualmente presente nel modello.

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

Trova o tenta di creare una destinazione del tipo di entità per il membro di navigazione specificato.

Si applica a