Leer en inglés

Compartir a través de


PropertyDiscoveryConvention Class

Definition

A convention that adds properties to entity types corresponding to scalar public properties on the CLR type.

C#
public class PropertyDiscoveryConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeBaseTypeChangedConvention
C#
public class PropertyDiscoveryConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IComplexPropertyAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeBaseTypeChangedConvention
Inheritance
PropertyDiscoveryConvention
Implements

Remarks

See Model building conventions for more information and examples.

Constructors

Properties

Dependencies

Dependencies for this service.

UseAttributes

A value indicating whether the convention will use attributes found on the members.

Methods

DiscoverPrimitiveProperties(IConventionTypeBaseBuilder, IConventionContext)

Discovers properties on the given structural type.

GetMembers(IConventionTypeBase)

Returns the CLR members from the given type that should be considered when discovering properties.

IsCandidatePrimitiveProperty(MemberInfo, IConventionTypeBase, CoreTypeMapping)

Returns a value indicating whether the given member is a primitive property candidate.

ProcessComplexPropertyAdded(IConventionComplexPropertyBuilder, IConventionContext<IConventionComplexPropertyBuilder>)

Called after a complex property is added to a type-like object.

ProcessEntityTypeAdded(IConventionEntityTypeBuilder, IConventionContext<IConventionEntityTypeBuilder>)

Called after an entity type is added to the model.

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

Called after the base type of an entity type changes.

Applies to

Producto Versiones
Entity Framework Core 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0