Share via


BackingFieldConvention Class

Definition

A convention that finds backing fields for properties based on their names:

  • <[property name]>k__BackingField
  • _[camel-cased property name]
  • _[property name]
  • m_[camel-cased property name]
  • m_[property name]
  • [property name]_
public class BackingFieldConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.INavigationAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IPropertyAddedConvention
public class BackingFieldConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IModelFinalizedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.INavigationAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IPropertyAddedConvention
public class BackingFieldConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IModelFinalizingConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.INavigationAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IPropertyAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.ISkipNavigationAddedConvention
public class BackingFieldConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IComplexPropertyAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IModelFinalizingConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.INavigationAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IPropertyAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.ISkipNavigationAddedConvention
type BackingFieldConvention = class
    interface IPropertyAddedConvention
    interface IConvention
    interface INavigationAddedConvention
type BackingFieldConvention = class
    interface IPropertyAddedConvention
    interface IConvention
    interface INavigationAddedConvention
    interface IModelFinalizedConvention
type BackingFieldConvention = class
    interface IPropertyAddedConvention
    interface IConvention
    interface INavigationAddedConvention
    interface ISkipNavigationAddedConvention
    interface IModelFinalizingConvention
type BackingFieldConvention = class
    interface IPropertyAddedConvention
    interface IConvention
    interface INavigationAddedConvention
    interface ISkipNavigationAddedConvention
    interface IComplexPropertyAddedConvention
    interface IModelFinalizingConvention
Public Class BackingFieldConvention
Implements INavigationAddedConvention, IPropertyAddedConvention
Public Class BackingFieldConvention
Implements IModelFinalizedConvention, INavigationAddedConvention, IPropertyAddedConvention
Public Class BackingFieldConvention
Implements IModelFinalizingConvention, INavigationAddedConvention, IPropertyAddedConvention, ISkipNavigationAddedConvention
Public Class BackingFieldConvention
Implements IComplexPropertyAddedConvention, IModelFinalizingConvention, INavigationAddedConvention, IPropertyAddedConvention, ISkipNavigationAddedConvention
Inheritance
BackingFieldConvention
Implements

Remarks

The field type must be of a type that's assignable to or from the property type. If more than one matching field is found an exception is thrown.

See Model building conventions for more information and examples.

Constructors

BackingFieldConvention(ProviderConventionSetBuilderDependencies)

Creates a new instance of BackingFieldConvention.

Properties

Dependencies

Dependencies for this service.

Methods

ProcessComplexPropertyAdded(IConventionComplexPropertyBuilder, IConventionContext<IConventionComplexPropertyBuilder>)

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

ProcessModelFinalized(IConventionModelBuilder, IConventionContext<IConventionModelBuilder>)

Called after a model is finalized.

ProcessModelFinalizing(IConventionModelBuilder, IConventionContext<IConventionModelBuilder>)

Called when a model is being finalized.

ProcessNavigationAdded(IConventionNavigationBuilder, IConventionContext<IConventionNavigationBuilder>)

Called after a navigation is added to the entity type.

ProcessNavigationAdded(IConventionRelationshipBuilder, IConventionNavigation, IConventionContext<IConventionNavigation>)

Called after a navigation is added to the entity type.

ProcessPropertyAdded(IConventionPropertyBuilder, IConventionContext<IConventionPropertyBuilder>)

Called after a property is added to the entity type.

ProcessSkipNavigationAdded(IConventionSkipNavigationBuilder, IConventionContext<IConventionSkipNavigationBuilder>)

Called after a skip navigation is added to the entity type.

Applies to