KeyDiscoveryConvention Classe
Definição
Importante
Algumas informações se referem a produtos de pré-lançamento que podem ser substancialmente modificados antes do lançamento. A Microsoft não oferece garantias, expressas ou implícitas, das informações aqui fornecidas.
Uma convenção que localiza a propriedade de chave primária para o tipo de entidade com base nos nomes, ignorando maiúsculas e minúsculas:
- Id
- [nome da entidade] Id
public class KeyDiscoveryConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeBaseTypeChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyOwnershipChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyPropertiesChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyRemovedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyUniquenessChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IKeyRemovedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IPropertyAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IPropertyFieldChangedConvention
public class KeyDiscoveryConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeBaseTypeChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyOwnershipChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyPropertiesChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyRemovedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyUniquenessChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IKeyRemovedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IPropertyAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.ISkipNavigationForeignKeyChangedConvention
public class KeyDiscoveryConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeBaseTypeChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeMemberIgnoredConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyOwnershipChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyPropertiesChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyRemovedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyUniquenessChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IKeyRemovedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IPropertyAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.ISkipNavigationForeignKeyChangedConvention
type KeyDiscoveryConvention = class
interface IEntityTypeAddedConvention
interface IConvention
interface IPropertyAddedConvention
interface IKeyRemovedConvention
interface IEntityTypeBaseTypeChangedConvention
interface IPropertyFieldChangedConvention
interface IForeignKeyAddedConvention
interface IForeignKeyRemovedConvention
interface IForeignKeyPropertiesChangedConvention
interface IForeignKeyUniquenessChangedConvention
interface IForeignKeyOwnershipChangedConvention
type KeyDiscoveryConvention = class
interface IEntityTypeAddedConvention
interface IConvention
interface IPropertyAddedConvention
interface IKeyRemovedConvention
interface IEntityTypeBaseTypeChangedConvention
interface IForeignKeyAddedConvention
interface IForeignKeyRemovedConvention
interface IForeignKeyPropertiesChangedConvention
interface IForeignKeyUniquenessChangedConvention
interface IForeignKeyOwnershipChangedConvention
interface ISkipNavigationForeignKeyChangedConvention
type KeyDiscoveryConvention = class
interface IEntityTypeAddedConvention
interface IConvention
interface IPropertyAddedConvention
interface IKeyRemovedConvention
interface IEntityTypeBaseTypeChangedConvention
interface IEntityTypeMemberIgnoredConvention
interface IForeignKeyAddedConvention
interface IForeignKeyRemovedConvention
interface IForeignKeyPropertiesChangedConvention
interface IForeignKeyUniquenessChangedConvention
interface IForeignKeyOwnershipChangedConvention
interface ISkipNavigationForeignKeyChangedConvention
Public Class KeyDiscoveryConvention
Implements IEntityTypeAddedConvention, IEntityTypeBaseTypeChangedConvention, IForeignKeyAddedConvention, IForeignKeyOwnershipChangedConvention, IForeignKeyPropertiesChangedConvention, IForeignKeyRemovedConvention, IForeignKeyUniquenessChangedConvention, IKeyRemovedConvention, IPropertyAddedConvention, IPropertyFieldChangedConvention
Public Class KeyDiscoveryConvention
Implements IEntityTypeAddedConvention, IEntityTypeBaseTypeChangedConvention, IForeignKeyAddedConvention, IForeignKeyOwnershipChangedConvention, IForeignKeyPropertiesChangedConvention, IForeignKeyRemovedConvention, IForeignKeyUniquenessChangedConvention, IKeyRemovedConvention, IPropertyAddedConvention, ISkipNavigationForeignKeyChangedConvention
Public Class KeyDiscoveryConvention
Implements IEntityTypeAddedConvention, IEntityTypeBaseTypeChangedConvention, IEntityTypeMemberIgnoredConvention, IForeignKeyAddedConvention, IForeignKeyOwnershipChangedConvention, IForeignKeyPropertiesChangedConvention, IForeignKeyRemovedConvention, IForeignKeyUniquenessChangedConvention, IKeyRemovedConvention, IPropertyAddedConvention, ISkipNavigationForeignKeyChangedConvention
- Herança
-
KeyDiscoveryConvention
- Derivado
- Implementações
-
IConvention IEntityTypeAddedConvention IEntityTypeBaseTypeChangedConvention IForeignKeyAddedConvention IForeignKeyOwnershipChangedConvention IForeignKeyPropertiesChangedConvention IForeignKeyRemovedConvention IForeignKeyUniquenessChangedConvention IKeyRemovedConvention IPropertyAddedConvention IPropertyFieldChangedConvention ISkipNavigationForeignKeyChangedConvention IEntityTypeMemberIgnoredConvention
Comentários
Se o tipo de entidade pertencer por meio de uma propriedade de navegação de referência, as propriedades de chave estrangeira correspondentes serão usadas.
Se o tipo de entidade pertencer por meio de uma propriedade de navegação de coleção, uma chave primária composta será configurada usando as propriedades de chave estrangeira com uma propriedade extra que corresponde à convenção de nomenclatura acima.
Consulte Convenções de criação de modelo para obter mais informações e exemplos.
Construtores
KeyDiscoveryConvention(ProviderConventionSetBuilderDependencies) |
Cria uma nova instância de KeyDiscoveryConvention. |
Propriedades
Dependencies |
Dependências para esse serviço. |
Métodos
Aplica-se a
Entity Framework