KeyDiscoveryConvention Classe
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Convention qui recherche la propriété de clé primaire pour le type d’entité en fonction des noms, en ignorant la casse :
- Id
- [nom de l’entité] 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
- Héritage
-
KeyDiscoveryConvention
- Dérivé
- Implémente
-
IConvention IEntityTypeAddedConvention IEntityTypeBaseTypeChangedConvention IForeignKeyAddedConvention IForeignKeyOwnershipChangedConvention IForeignKeyPropertiesChangedConvention IForeignKeyRemovedConvention IForeignKeyUniquenessChangedConvention IKeyRemovedConvention IPropertyAddedConvention IPropertyFieldChangedConvention ISkipNavigationForeignKeyChangedConvention IEntityTypeMemberIgnoredConvention
Remarques
Si le type d’entité est détenu via une propriété de navigation de référence, les propriétés de clé étrangère correspondantes sont utilisées.
Si le type d’entité est détenu via une propriété de navigation de collection, une clé primaire composite est configurée à l’aide des propriétés de clé étrangère avec une propriété supplémentaire qui correspond à la convention de nommage ci-dessus.
Pour plus d’informations et d’exemples, consultez Conventions de génération de modèles.
Constructeurs
KeyDiscoveryConvention(ProviderConventionSetBuilderDependencies) |
Crée une instance de KeyDiscoveryConvention. |
Propriétés
Dependencies |
Dépendances pour ce service. |