Table of Contents

Class ColumnAttributeConvention

Namespace
MongoDB.EntityFrameworkCore.Metadata.Conventions
Assembly
MongoDB.EntityFrameworkCore.dll

A convention that configures the element name for entity properties based on an applied ColumnAttribute for familiarity/compatibility with other EF providers.

public class ColumnAttributeConvention : PropertyAttributeConventionBase<ColumnAttribute>, IPropertyAddedConvention, IPropertyFieldChangedConvention, INavigationAddedConvention, IConvention
Inheritance
ColumnAttributeConvention
Implements
Inherited Members

Constructors

ColumnAttributeConvention(ProviderConventionSetBuilderDependencies)

Creates a CollectionAttributeConvention.

Methods

ProcessNavigationAdded(IConventionNavigationBuilder, IConventionContext<IConventionNavigationBuilder>)

For every navigation added to the model that is an owned entity with a ColumnAttribute use the specified element name as an annotation to configure the element name used in the BSON documents.

ProcessPropertyAdded(IConventionPropertyBuilder, ColumnAttribute, MemberInfo, IConventionContext)

For every property added to the model that has a ColumnAttribute use the specified name as an annotation to configure the element name used in BSON documents.