다음을 통해 공유


PropertyDiscoveryConvention Class

Definition

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

public class PropertyDiscoveryConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeBaseTypeChangedConvention
public class PropertyDiscoveryConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IComplexPropertyAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeBaseTypeChangedConvention
type PropertyDiscoveryConvention = class
    interface IEntityTypeAddedConvention
    interface IConvention
    interface IEntityTypeBaseTypeChangedConvention
type PropertyDiscoveryConvention = class
    interface IEntityTypeAddedConvention
    interface IConvention
    interface IEntityTypeBaseTypeChangedConvention
    interface IComplexPropertyAddedConvention
Public Class PropertyDiscoveryConvention
Implements IEntityTypeAddedConvention, IEntityTypeBaseTypeChangedConvention
Public Class PropertyDiscoveryConvention
Implements IComplexPropertyAddedConvention, IEntityTypeAddedConvention, IEntityTypeBaseTypeChangedConvention
Inheritance
PropertyDiscoveryConvention
Implements

Remarks

See Model building conventions for more information and examples.

Constructors

PropertyDiscoveryConvention(ProviderConventionSetBuilderDependencies, Boolean)

Creates a new instance of PropertyDiscoveryConvention.

PropertyDiscoveryConvention(ProviderConventionSetBuilderDependencies)

Creates a new instance of PropertyDiscoveryConvention.

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