Sdílet prostřednictvím


TypeAttributeConventionBase<TAttribute> Třída

Definice

Základní typ pro konvence, které provádějí konfiguraci na základě atributu zadaného na strukturálním typu.

public abstract class TypeAttributeConventionBase<TAttribute> : Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAddedConvention where TAttribute : Attribute
type TypeAttributeConventionBase<'Attribute (requires 'Attribute :> Attribute)> = class
    interface IEntityTypeAddedConvention
    interface IConvention
Public MustInherit Class TypeAttributeConventionBase(Of TAttribute)
Implements IEntityTypeAddedConvention

Parametry typu

TAttribute

Typ atributu, který chcete vyhledat.

Dědičnost
TypeAttributeConventionBase<TAttribute>
Odvozené
Implementuje

Poznámky

Další informace a příklady najdete v tématu Konvence vytváření modelů .

Konstruktory

TypeAttributeConventionBase<TAttribute>(ProviderConventionSetBuilderDependencies)

Vytvoří novou instanci položky TypeAttributeConventionBase<TAttribute>.

Vlastnosti

Dependencies

Závislosti pro tuto službu.

Metody

ProcessComplexPropertyAdded(IConventionComplexPropertyBuilder, IConventionContext<IConventionComplexPropertyBuilder>)

Volá se po přidání komplexní vlastnosti do objektu podobného typu.

ProcessComplexTypeAdded(IConventionComplexTypeBuilder, TAttribute, IConventionContext)

Volá se po přidání komplexního typu do modelu, pokud má atribut.

ProcessEntityTypeAdded(IConventionEntityTypeBuilder, IConventionContext<IConventionEntityTypeBuilder>)

Volá se po přidání typu entity do modelu.

ProcessEntityTypeAdded(IConventionEntityTypeBuilder, TAttribute, IConventionContext<IConventionEntityTypeBuilder>)

Volá se po přidání typu entity do modelu, pokud má atribut.

ReplaceWithEntityType(IConventionComplexTypeBuilder, Nullable<Boolean>)

Pokusí se nahradit komplexní typ typem entity.

Platí pro