KeyAttributeConvention Klasa

Definicja

Konwencja, która konfiguruje klucz typu jednostki na KeyAttribute podstawie określonej właściwości lub PrimaryKeyAttribute określonej w typie 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
Dziedziczenie
Implementuje

Uwagi

Aby uzyskać więcej informacji i przykłady, zobacz Konwencje tworzenia modeli .

Konstruktory

KeyAttributeConvention(ProviderConventionSetBuilderDependencies)

Tworzy nowe wystąpienie klasy KeyAttributeConvention.

Właściwości

Dependencies

Zależności dla tej usługi.

(Odziedziczone po PropertyAttributeConventionBase<TAttribute>)

Metody

ProcessComplexPropertyAdded(IConventionComplexPropertyBuilder, IConventionContext<IConventionComplexPropertyBuilder>)

Wywoływana po dodaniu właściwości złożonej do obiektu przypominającego typ.

(Odziedziczone po PropertyAttributeConventionBase<TAttribute>)
ProcessComplexPropertyFieldChanged(IConventionComplexPropertyBuilder, FieldInfo, FieldInfo, IConventionContext<FieldInfo>)

Wywoływane po zmianie pola zapasowego dla właściwości złożonej.

(Odziedziczone po PropertyAttributeConventionBase<TAttribute>)
ProcessEntityTypeAdded(IConventionEntityTypeBuilder, IConventionContext<IConventionEntityTypeBuilder>)

Wywoływane po dodaniu typu jednostki do modelu.

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

Wywoływane po zmianie typu podstawowego typu jednostki.

ProcessModelFinalized(IConventionModelBuilder, IConventionContext<IConventionModelBuilder>)

Wywoływane po sfinalizowaniu modelu.

ProcessModelFinalizing(IConventionModelBuilder, IConventionContext<IConventionModelBuilder>)

Wywoływana, gdy model jest finalizowany.

ProcessPropertyAdded(IConventionComplexPropertyBuilder, KeyAttribute, MemberInfo, IConventionContext)

Konwencja, która konfiguruje klucz typu jednostki na KeyAttribute podstawie określonej właściwości lub PrimaryKeyAttribute określonej w typie CLR.

ProcessPropertyAdded(IConventionComplexPropertyBuilder, TAttribute, MemberInfo, IConventionContext)

Wywoływana po dodaniu właściwości złożonej do typu z atrybutem w skojarzonej właściwości lub polu CLR.

(Odziedziczone po PropertyAttributeConventionBase<TAttribute>)
ProcessPropertyAdded(IConventionPropertyBuilder, IConventionContext<IConventionPropertyBuilder>)

Wywoływane po dodaniu właściwości do typu jednostki.

(Odziedziczone po PropertyAttributeConventionBase<TAttribute>)
ProcessPropertyAdded(IConventionPropertyBuilder, KeyAttribute, MemberInfo, IConventionContext)

Wywoływana po dodaniu właściwości do typu jednostki z atrybutem we skojarzonej właściwości lub polu CLR.

ProcessPropertyAdded(IConventionPropertyBuilder, TAttribute, MemberInfo, IConventionContext)

Wywoływana po dodaniu właściwości do typu jednostki z atrybutem we skojarzonej właściwości lub polu CLR.

(Odziedziczone po PropertyAttributeConventionBase<TAttribute>)
ProcessPropertyFieldChanged(IConventionPropertyBuilder, FieldInfo, FieldInfo, IConventionContext<FieldInfo>)

Wywoływane po zmianie pola zapasowego właściwości.

(Odziedziczone po PropertyAttributeConventionBase<TAttribute>)

Dotyczy