ForeignKeyPropertyDiscoveryConvention 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 le proprietà di chiave esterna per le relazioni in base ai nomi, ignorando la distinzione tra maiuscole e minuscole:
- [nome proprietà di navigazione] [nome della proprietà della chiave principale]
- [nome proprietà di navigazione] Id
- [nome entità principale] [nome della proprietà della chiave principale]
- [nome entità principale] Id
public class ForeignKeyPropertyDiscoveryConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeMemberIgnoredConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypePrimaryKeyChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyPrincipalEndChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyPropertiesChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyRequirednessChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyUniquenessChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IKeyAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IKeyRemovedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IModelFinalizedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.INavigationAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IPropertyAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IPropertyFieldChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IPropertyNullabilityChangedConvention
public class ForeignKeyPropertyDiscoveryConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeMemberIgnoredConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypePrimaryKeyChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyPrincipalEndChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyPropertiesChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyRequirednessChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyUniquenessChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IKeyAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IKeyRemovedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IModelFinalizingConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.INavigationAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IPropertyAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IPropertyFieldChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IPropertyNullabilityChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.ISkipNavigationForeignKeyChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.ISkipNavigationInverseChangedConvention
type ForeignKeyPropertyDiscoveryConvention = class
interface IForeignKeyAddedConvention
interface IConvention
interface INavigationAddedConvention
interface IPropertyAddedConvention
interface IEntityTypeMemberIgnoredConvention
interface IPropertyNullabilityChangedConvention
interface IPropertyFieldChangedConvention
interface IForeignKeyPropertiesChangedConvention
interface IForeignKeyPrincipalEndChangedConvention
interface IForeignKeyUniquenessChangedConvention
interface IForeignKeyRequirednessChangedConvention
interface IKeyAddedConvention
interface IKeyRemovedConvention
interface IEntityTypePrimaryKeyChangedConvention
interface IModelFinalizedConvention
type ForeignKeyPropertyDiscoveryConvention = class
interface IEntityTypeMemberIgnoredConvention
interface IConvention
interface IEntityTypePrimaryKeyChangedConvention
interface IForeignKeyAddedConvention
interface IForeignKeyPropertiesChangedConvention
interface IForeignKeyPrincipalEndChangedConvention
interface IForeignKeyUniquenessChangedConvention
interface IForeignKeyRequirednessChangedConvention
interface IKeyAddedConvention
interface IKeyRemovedConvention
interface INavigationAddedConvention
interface ISkipNavigationForeignKeyChangedConvention
interface ISkipNavigationInverseChangedConvention
interface IPropertyAddedConvention
interface IPropertyNullabilityChangedConvention
interface IPropertyFieldChangedConvention
interface IModelFinalizingConvention
Public Class ForeignKeyPropertyDiscoveryConvention
Implements IEntityTypeMemberIgnoredConvention, IEntityTypePrimaryKeyChangedConvention, IForeignKeyAddedConvention, IForeignKeyPrincipalEndChangedConvention, IForeignKeyPropertiesChangedConvention, IForeignKeyRequirednessChangedConvention, IForeignKeyUniquenessChangedConvention, IKeyAddedConvention, IKeyRemovedConvention, IModelFinalizedConvention, INavigationAddedConvention, IPropertyAddedConvention, IPropertyFieldChangedConvention, IPropertyNullabilityChangedConvention
Public Class ForeignKeyPropertyDiscoveryConvention
Implements IEntityTypeMemberIgnoredConvention, IEntityTypePrimaryKeyChangedConvention, IForeignKeyAddedConvention, IForeignKeyPrincipalEndChangedConvention, IForeignKeyPropertiesChangedConvention, IForeignKeyRequirednessChangedConvention, IForeignKeyUniquenessChangedConvention, IKeyAddedConvention, IKeyRemovedConvention, IModelFinalizingConvention, INavigationAddedConvention, IPropertyAddedConvention, IPropertyFieldChangedConvention, IPropertyNullabilityChangedConvention, ISkipNavigationForeignKeyChangedConvention, ISkipNavigationInverseChangedConvention
- Ereditarietà
-
ForeignKeyPropertyDiscoveryConvention
- Implementazioni
-
IConvention IEntityTypeMemberIgnoredConvention IEntityTypePrimaryKeyChangedConvention IForeignKeyAddedConvention IForeignKeyPrincipalEndChangedConvention IForeignKeyPropertiesChangedConvention IForeignKeyRequirednessChangedConvention IForeignKeyUniquenessChangedConvention IKeyAddedConvention IKeyRemovedConvention IModelFinalizedConvention INavigationAddedConvention IPropertyAddedConvention IPropertyFieldChangedConvention IPropertyNullabilityChangedConvention IModelFinalizingConvention ISkipNavigationForeignKeyChangedConvention ISkipNavigationInverseChangedConvention
Commenti
Se non sono state trovate proprietà corrispondenti, la relazione non rappresenta una proprietà, il lato dipendente non è ambiguo e non è derivato, se la relazione è uno-a-uno, vengono usate le proprietà della chiave primaria. In caso contrario, la convenzione tenta di associare le proprietà con il nome esatto come proprietà chiave principale se sono un subset appropriato dell'infrastruttura PK dipendente.
Se è stata trovata una corrispondenza, ma i tipi di proprietà non sono compatibili con i tipi di chiave principale non vengono cercate altre corrispondenze.
Se la relazione utilizza proprietà shadow create per convenzione, vengono ricreate per rimuovere i suffissi usati per rendere univoci i nomi.
Per altre informazioni ed esempi, vedere Convenzioni di compilazione di modelli.
Costruttori
ForeignKeyPropertyDiscoveryConvention(ProviderConventionSetBuilderDependencies) |
Crea una nuova istanza di ForeignKeyPropertyDiscoveryConvention. |
Proprietà
Dependencies |
Dipendenze per questo servizio. |