KeyAttributeConvention Sınıf

Tanım

Varlık türü anahtarını bir özellikte belirtilen değerine göre KeyAttribute yapılandıran bir kural.

public class KeyAttributeConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.PropertyAttributeConventionBase<System.ComponentModel.DataAnnotations.KeyAttribute>, Microsoft.EntityFrameworkCore.Metadata.Conventions.IModelFinalizedConvention
public class KeyAttributeConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.PropertyAttributeConventionBase<System.ComponentModel.DataAnnotations.KeyAttribute>, Microsoft.EntityFrameworkCore.Metadata.Conventions.IModelFinalizingConvention
type KeyAttributeConvention = class
    inherit PropertyAttributeConventionBase<KeyAttribute>
    interface IModelFinalizedConvention
    interface IConvention
type KeyAttributeConvention = class
    inherit PropertyAttributeConventionBase<KeyAttribute>
    interface IModelFinalizingConvention
    interface IConvention
Public Class KeyAttributeConvention
Inherits PropertyAttributeConventionBase(Of KeyAttribute)
Implements IModelFinalizedConvention
Public Class KeyAttributeConvention
Inherits PropertyAttributeConventionBase(Of KeyAttribute)
Implements IModelFinalizingConvention
Devralma
Uygulamalar

Açıklamalar

Daha fazla bilgi için bkz. Model bina kuralları.

Oluşturucular

KeyAttributeConvention(ProviderConventionSetBuilderDependencies)

KeyAttributeConvention öğesinin yeni bir örneğini oluşturur.

Özellikler

Dependencies

Bu hizmet için bağımlılıklar.

(Devralındığı yer: PropertyAttributeConventionBase<TAttribute>)

Yöntemler

ProcessModelFinalized(IConventionModelBuilder, IConventionContext<IConventionModelBuilder>)

Model son hale getirildikten sonra çağrılır.

ProcessModelFinalizing(IConventionModelBuilder, IConventionContext<IConventionModelBuilder>)

Modelin son hale getirildikleri zaman çağrılır.

ProcessPropertyAdded(IConventionPropertyBuilder, IConventionContext<IConventionPropertyBuilder>)

Varlık türüne bir Özellik eklendikten sonra çağırılır.

(Devralındığı yer: PropertyAttributeConventionBase<TAttribute>)
ProcessPropertyAdded(IConventionPropertyBuilder, KeyAttribute, MemberInfo, IConventionContext)

İlişkili CLR özelliği veya alanında bir özniteliği olan varlık türüne bir özellik eklendikten sonra çağrılır.

ProcessPropertyAdded(IConventionPropertyBuilder, TAttribute, MemberInfo, IConventionContext)

İlişkili CLR özelliği veya alanı üzerinde bir özniteliği olan varlık türüne bir Özellik eklendikten sonra çağırılır.

(Devralındığı yer: PropertyAttributeConventionBase<TAttribute>)
ProcessPropertyFieldChanged(IConventionPropertyBuilder, FieldInfo, FieldInfo, IConventionContext<FieldInfo>)

Bir özellik için yedekleme alanı değiştirildikten sonra çağırılır.

(Devralındığı yer: PropertyAttributeConventionBase<TAttribute>)

Şunlara uygulanır