Compartilhar via


RelationshipDiscoveryConvention Classe

Definição

Uma convenção que configura relações entre tipos de entidade com base nas propriedades de navegação, desde que não haja ambiguidade quanto à qual é a navegação inversa correspondente.

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
Herança
RelationshipDiscoveryConvention
Derivado
Implementações

Comentários

Consulte Convenções de criação de modelo para obter mais informações e exemplos.

Construtores

RelationshipDiscoveryConvention(ProviderConventionSetBuilderDependencies)

Cria uma nova instância de RelationshipDiscoveryConvention.

Propriedades

Dependencies

Dependências para esse serviço.

Métodos

ProcessEntityTypeAdded(IConventionEntityTypeBuilder, IConventionContext<IConventionEntityTypeBuilder>)

Chamado depois que um tipo de entidade é adicionado ao modelo.

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

Chamado depois que o tipo base de um tipo de entidade é alterado.

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

Chamado depois que um tipo de entidade é ignorado.

ProcessEntityTypeMemberIgnored(IConventionEntityTypeBuilder, String, IConventionContext<String>)

Chamado depois que um membro do tipo de entidade é ignorado.

ProcessForeignKeyNullNavigationSet(IConventionForeignKeyBuilder, Boolean, IConventionContext<IConventionNavigation>)

Chamado depois que uma navegação é definida null como em uma chave estrangeira.

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

Chamado depois que o valor de propriedade de uma chave estrangeira é alterado.

ProcessForeignKeyOwnershipChanged(IConventionRelationshipBuilder, IConventionContext<IConventionRelationshipBuilder>)

Chamado depois que o valor de propriedade de uma chave estrangeira é alterado.

ProcessForeignKeyRemoved(IConventionEntityTypeBuilder, IConventionForeignKey, IConventionContext<IConventionForeignKey>)

Chamado depois que uma chave estrangeira é removida.

ProcessNavigationAdded(IConventionNavigationBuilder, IConventionContext<IConventionNavigationBuilder>)

Chamado depois que uma navegação é adicionada ao tipo de entidade.

ProcessNavigationAdded(IConventionRelationshipBuilder, IConventionNavigation, IConventionContext<IConventionNavigation>)

Chamado depois que uma navegação é adicionada ao tipo de entidade.

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

Chamado depois que uma navegação é removida do tipo de entidade.

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

Chamado depois que um tipo de entidade é ignorado.

ShouldBeOwned(Type, IConventionModel)

Retorna um valor que indica se o tipo de entidade determinado deve ser adicionado como propriedade se não estiver no modelo no momento.

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

Localiza ou tenta criar um destino de tipo de entidade para o membro de navegação fornecido.

Aplica-se a