ForeignKeyPropertyDiscoveryConvention Sınıf
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
Adları temelinde ilişkilerin yabancı anahtar özelliklerini bulan ve büyük/küçük harf yok sayan bir kural:
- [gezinti özelliği adı] [asıl anahtar özellik adı]
- [gezinti özelliği adı] Kimliği
- [asıl varlık adı] [asıl anahtar özellik adı]
- [asıl varlık adı] Kimliği
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
- Devralma
-
ForeignKeyPropertyDiscoveryConvention
- Uygulamalar
-
IConvention IEntityTypeMemberIgnoredConvention IEntityTypePrimaryKeyChangedConvention IForeignKeyAddedConvention IForeignKeyPrincipalEndChangedConvention IForeignKeyPropertiesChangedConvention IForeignKeyRequirednessChangedConvention IForeignKeyUniquenessChangedConvention IKeyAddedConvention IKeyRemovedConvention IModelFinalizedConvention INavigationAddedConvention IPropertyAddedConvention IPropertyFieldChangedConvention IPropertyNullabilityChangedConvention IModelFinalizingConvention ISkipNavigationForeignKeyChangedConvention ISkipNavigationInverseChangedConvention
Açıklamalar
Eşleşen hiçbir özellik bulunamazsa, ilişki bir sahipliği temsil etmez, bağımlı taraf belirsiz değildir ve ilişki bire bir ise, birincil anahtar özellikleri kullanılır; aksi takdirde kural, bağımlı PK'nın düzgün bir alt kümesiyse özellikleri asıl anahtar özellikleri olarak tam adla eşleştirmeye çalışır.
Bir eşleşme bulunduysa, ancak özellik türleri asıl anahtar türleriyle uyumlu değilse, başka hiçbir eşleşme aranamaz.
İlişki, kural tarafından oluşturulan gölge özellikleri kullanıyorsa, adları benzersiz hale getirmek için kullanılan sonekleri kaldırmak için yeniden oluşturulur.
Daha fazla bilgi ve örnek için bkz. Model oluşturma kuralları .
Oluşturucular
ForeignKeyPropertyDiscoveryConvention(ProviderConventionSetBuilderDependencies) |
ForeignKeyPropertyDiscoveryConvention öğesinin yeni bir örneğini oluşturur. |
Özellikler
Dependencies |
Bu hizmet için bağımlılıklar. |
Yöntemler
Şunlara uygulanır
Entity Framework