Bagikan melalui


KeyAttributeConvention Kelas

Definisi

Konvensi yang mengonfigurasi kunci jenis entitas berdasarkan KeyAttribute yang ditentukan pada properti atau PrimaryKeyAttribute ditentukan pada jenis CLR.

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
public class KeyAttributeConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.PropertyAttributeConventionBase<System.ComponentModel.DataAnnotations.KeyAttribute>, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeBaseTypeChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IModelFinalizingConvention
public class KeyAttributeConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.PropertyAttributeConventionBase<System.ComponentModel.DataAnnotations.KeyAttribute>, Microsoft.EntityFrameworkCore.Metadata.Conventions.IComplexPropertyAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeBaseTypeChangedConvention, 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
type KeyAttributeConvention = class
    inherit PropertyAttributeConventionBase<KeyAttribute>
    interface IModelFinalizingConvention
    interface IConvention
    interface IEntityTypeAddedConvention
    interface IEntityTypeBaseTypeChangedConvention
type KeyAttributeConvention = class
    inherit PropertyAttributeConventionBase<KeyAttribute>
    interface IModelFinalizingConvention
    interface IConvention
    interface IEntityTypeAddedConvention
    interface IEntityTypeBaseTypeChangedConvention
    interface IComplexPropertyAddedConvention
Public Class KeyAttributeConvention
Inherits PropertyAttributeConventionBase(Of KeyAttribute)
Implements IModelFinalizedConvention
Public Class KeyAttributeConvention
Inherits PropertyAttributeConventionBase(Of KeyAttribute)
Implements IModelFinalizingConvention
Public Class KeyAttributeConvention
Inherits PropertyAttributeConventionBase(Of KeyAttribute)
Implements IEntityTypeAddedConvention, IEntityTypeBaseTypeChangedConvention, IModelFinalizingConvention
Public Class KeyAttributeConvention
Inherits PropertyAttributeConventionBase(Of KeyAttribute)
Implements IComplexPropertyAddedConvention, IEntityTypeAddedConvention, IEntityTypeBaseTypeChangedConvention, IModelFinalizingConvention
Warisan
Penerapan

Keterangan

Lihat Konvensi pembuatan model untuk informasi dan contoh selengkapnya.

Konstruktor

KeyAttributeConvention(ProviderConventionSetBuilderDependencies)

Membuat instans baru .KeyAttributeConvention

Properti

Dependencies

Dependensi untuk layanan ini.

(Diperoleh dari PropertyAttributeConventionBase<TAttribute>)

Metode

ProcessComplexPropertyAdded(IConventionComplexPropertyBuilder, IConventionContext<IConventionComplexPropertyBuilder>)

Dipanggil setelah properti kompleks ditambahkan ke objek seperti jenis.

(Diperoleh dari PropertyAttributeConventionBase<TAttribute>)
ProcessComplexPropertyFieldChanged(IConventionComplexPropertyBuilder, FieldInfo, FieldInfo, IConventionContext<FieldInfo>)

Dipanggil setelah bidang dukungan untuk properti kompleks diubah.

(Diperoleh dari PropertyAttributeConventionBase<TAttribute>)
ProcessEntityTypeAdded(IConventionEntityTypeBuilder, IConventionContext<IConventionEntityTypeBuilder>)

Dipanggil setelah jenis entitas ditambahkan ke model.

ProcessEntityTypeBaseTypeChanged(IConventionEntityTypeBuilder, IConventionEntityType, IConventionEntityType, IConventionContext<IConventionEntityType>)

Dipanggil setelah jenis dasar jenis entitas berubah.

ProcessModelFinalized(IConventionModelBuilder, IConventionContext<IConventionModelBuilder>)

Dipanggil setelah model diselesaikan.

ProcessModelFinalizing(IConventionModelBuilder, IConventionContext<IConventionModelBuilder>)

Dipanggil ketika model sedang diselesaikan.

ProcessPropertyAdded(IConventionComplexPropertyBuilder, KeyAttribute, MemberInfo, IConventionContext)

Konvensi yang mengonfigurasi kunci jenis entitas berdasarkan KeyAttribute yang ditentukan pada properti atau PrimaryKeyAttribute ditentukan pada jenis CLR.

ProcessPropertyAdded(IConventionComplexPropertyBuilder, TAttribute, MemberInfo, IConventionContext)

Dipanggil setelah properti kompleks ditambahkan ke jenis dengan atribut pada properti atau bidang CLR terkait.

(Diperoleh dari PropertyAttributeConventionBase<TAttribute>)
ProcessPropertyAdded(IConventionPropertyBuilder, IConventionContext<IConventionPropertyBuilder>)

Dipanggil setelah properti ditambahkan ke jenis entitas.

(Diperoleh dari PropertyAttributeConventionBase<TAttribute>)
ProcessPropertyAdded(IConventionPropertyBuilder, KeyAttribute, MemberInfo, IConventionContext)

Dipanggil setelah properti ditambahkan ke jenis entitas dengan atribut pada properti atau bidang CLR terkait.

ProcessPropertyAdded(IConventionPropertyBuilder, TAttribute, MemberInfo, IConventionContext)

Dipanggil setelah properti ditambahkan ke jenis entitas dengan atribut pada properti atau bidang CLR terkait.

(Diperoleh dari PropertyAttributeConventionBase<TAttribute>)
ProcessPropertyFieldChanged(IConventionPropertyBuilder, FieldInfo, FieldInfo, IConventionContext<FieldInfo>)

Dipanggil setelah bidang dukungan untuk properti diubah.

(Diperoleh dari PropertyAttributeConventionBase<TAttribute>)

Berlaku untuk