KeyDiscoveryConvention Classe
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Convenzione che trova la proprietà chiave primaria per il tipo di entità in base ai nomi, ignorando la distinzione tra maiuscole e minuscole:
- ID
- [nome 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
- Ereditarietà
-
KeyDiscoveryConvention
- Derivato
- Implementazioni
-
IConvention IEntityTypeAddedConvention IEntityTypeBaseTypeChangedConvention IForeignKeyAddedConvention IForeignKeyOwnershipChangedConvention IForeignKeyPropertiesChangedConvention IForeignKeyRemovedConvention IForeignKeyUniquenessChangedConvention IKeyRemovedConvention IPropertyAddedConvention IPropertyFieldChangedConvention ISkipNavigationForeignKeyChangedConvention IEntityTypeMemberIgnoredConvention
Commenti
Se il tipo di entità è di proprietà tramite una proprietà di navigazione di riferimento, vengono utilizzate le proprietà della chiave esterna corrispondenti.
Se il tipo di entità è di proprietà di una proprietà di navigazione della raccolta, viene configurata una chiave primaria composita usando le proprietà della chiave esterna con una proprietà aggiuntiva corrispondente alla convenzione di denominazione precedente.
Per altre informazioni ed esempi, vedere Convenzioni di compilazione di modelli.
Costruttori
KeyDiscoveryConvention(ProviderConventionSetBuilderDependencies) |
Crea una nuova istanza di KeyDiscoveryConvention. |
Proprietà
Dependencies |
Dipendenze per questo servizio. |