Table of Contents

Class NavigationBackingFieldAttributeConvention

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

A convention that configures a navigation property as having a backing field based on the Microsoft.EntityFrameworkCore.BackingFieldAttribute attribute.

public class NavigationBackingFieldAttributeConvention : NavigationAttributeConventionBase<BackingFieldAttribute>, INavigationAddedConvention, ISkipNavigationAddedConvention, IConvention
Inheritance
NavigationAttributeConventionBase<BackingFieldAttribute>
NavigationBackingFieldAttributeConvention
Implements
Inherited Members

Remarks

See Model building conventions for more information and examples.

Constructors

NavigationBackingFieldAttributeConvention(ProviderConventionSetBuilderDependencies)

Creates a new instance of NavigationBackingFieldAttributeConvention.

public NavigationBackingFieldAttributeConvention(ProviderConventionSetBuilderDependencies dependencies)

Parameters

dependencies ProviderConventionSetBuilderDependencies

Parameter object containing dependencies for this convention.

Methods

ProcessNavigationAdded(IConventionNavigationBuilder, BackingFieldAttribute, IConventionContext<IConventionNavigationBuilder>)

Called after a navigation property that has an attribute is added to an entity type.

public override void ProcessNavigationAdded(IConventionNavigationBuilder navigationBuilder, BackingFieldAttribute attribute, IConventionContext<IConventionNavigationBuilder> context)

Parameters

navigationBuilder IConventionNavigationBuilder

The builder for the navigation.

attribute BackingFieldAttribute

The attribute.

context IConventionContext<IConventionNavigationBuilder>

Additional information associated with convention execution.

ProcessSkipNavigationAdded(IConventionSkipNavigationBuilder, BackingFieldAttribute, IConventionContext<IConventionSkipNavigationBuilder>)

public override void ProcessSkipNavigationAdded(IConventionSkipNavigationBuilder skipNavigationBuilder, BackingFieldAttribute attribute, IConventionContext<IConventionSkipNavigationBuilder> context)

Parameters

skipNavigationBuilder IConventionSkipNavigationBuilder
attribute BackingFieldAttribute
context IConventionContext<IConventionSkipNavigationBuilder>