Table of Contents

Class ServicePropertyDiscoveryConvention

Namespace
Microsoft.EntityFrameworkCore.Metadata.Conventions
Assembly
Microsoft.EntityFrameworkCore.dll

A convention that adds service properties to entity types.

public class ServicePropertyDiscoveryConvention : IEntityTypeAddedConvention, IEntityTypeBaseTypeChangedConvention, IConvention
Inheritance
ServicePropertyDiscoveryConvention
Implements
Inherited Members

Remarks

See Model building conventions for more information and examples.

Constructors

ServicePropertyDiscoveryConvention(ProviderConventionSetBuilderDependencies)

Creates a new instance of ServicePropertyDiscoveryConvention.

public ServicePropertyDiscoveryConvention(ProviderConventionSetBuilderDependencies dependencies)

Parameters

dependencies ProviderConventionSetBuilderDependencies

Parameter object containing dependencies for this convention.

Properties

Dependencies

Dependencies for this service.

protected virtual ProviderConventionSetBuilderDependencies Dependencies { get; }

Property Value

ProviderConventionSetBuilderDependencies

Methods

ProcessEntityTypeAdded(IConventionEntityTypeBuilder, IConventionContext<IConventionEntityTypeBuilder>)

Called after an entity type is added to the model.

public virtual void ProcessEntityTypeAdded(IConventionEntityTypeBuilder entityTypeBuilder, IConventionContext<IConventionEntityTypeBuilder> context)

Parameters

entityTypeBuilder IConventionEntityTypeBuilder

The builder for the entity type.

context IConventionContext<IConventionEntityTypeBuilder>

Additional information associated with convention execution.

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

Called after the base type of an entity type changes.

public virtual void ProcessEntityTypeBaseTypeChanged(IConventionEntityTypeBuilder entityTypeBuilder, IConventionEntityType? newBaseType, IConventionEntityType? oldBaseType, IConventionContext<IConventionEntityType> context)

Parameters

entityTypeBuilder IConventionEntityTypeBuilder

The builder for the entity type.

newBaseType IConventionEntityType

The new base entity type.

oldBaseType IConventionEntityType

The old base entity type.

context IConventionContext<IConventionEntityType>

Additional information associated with convention execution.