Class BsonElementAttributeConvention
- Assembly
- MongoDB.EntityFrameworkCore.dll
A convention that configures the element name for entity properties based on an applied MongoDB.Bson.Serialization.Attributes.BsonElementAttribute for familiarity with the Mongo C# Driver.
public sealed class BsonElementAttributeConvention : PropertyAttributeConventionBase<BsonElementAttribute>, IPropertyAddedConvention, IPropertyFieldChangedConvention, INavigationAddedConvention, IConvention
- Inheritance
-
PropertyAttributeConventionBase<BsonElementAttribute>BsonElementAttributeConvention
- Implements
- Inherited Members
Constructors
- BsonElementAttributeConvention(ProviderConventionSetBuilderDependencies)
Creates a BsonElementAttributeConvention.
Methods
- ProcessNavigationAdded(IConventionNavigationBuilder, IConventionContext<IConventionNavigationBuilder>)
For every navigation added to the model that is an owned entity with a MongoDB.Bson.Serialization.Attributes.BsonElementAttribute use the specified element name as an annotation to configure the element name used in the BSON documents.
- ProcessPropertyAdded(IConventionPropertyBuilder, BsonElementAttribute, MemberInfo, IConventionContext)
For every property added to the model that has a MongoDB.Bson.Serialization.Attributes.BsonElementAttribute use the specified name as an annotation to configure the element name used in BSON documents.