Share via


PropertyDiscoveryConvention Class

Definition

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

[System.Runtime.CompilerServices.Nullable(0)]
public class PropertyDiscoveryConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IComplexPropertyAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeBaseTypeChangedConvention
public class PropertyDiscoveryConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeBaseTypeChangedConvention
[<System.Runtime.CompilerServices.Nullable(0)>]
type PropertyDiscoveryConvention = class
    interface IEntityTypeAddedConvention
    interface IConvention
    interface IEntityTypeBaseTypeChangedConvention
    interface IComplexPropertyAddedConvention
type PropertyDiscoveryConvention = class
    interface IEntityTypeAddedConvention
    interface IConvention
    interface IEntityTypeBaseTypeChangedConvention
Public Class PropertyDiscoveryConvention
Implements IComplexPropertyAddedConvention, IEntityTypeAddedConvention, IEntityTypeBaseTypeChangedConvention
Public Class PropertyDiscoveryConvention
Implements IEntityTypeAddedConvention, IEntityTypeBaseTypeChangedConvention
Inheritance
PropertyDiscoveryConvention
Attributes
Implements

Remarks

See Model building conventions for more information and examples.

Constructors

Name Description
PropertyDiscoveryConvention(ProviderConventionSetBuilderDependencies, Boolean)

Creates a new instance of PropertyDiscoveryConvention.

PropertyDiscoveryConvention(ProviderConventionSetBuilderDependencies)

Creates a new instance of PropertyDiscoveryConvention.

Properties

Name Description
Dependencies

Dependencies for this service.

UseAttributes

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

Methods

Name Description
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