Table of Contents

Class BsonRequiredPropertyAttributeConvention

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

A convention that configures properties as required if they have the MongoDB.Bson.Serialization.Attributes.BsonRequiredAttribute applied.

public sealed class BsonRequiredPropertyAttributeConvention : PropertyAttributeConventionBase<BsonRequiredAttribute>, IPropertyAddedConvention, IPropertyFieldChangedConvention, IComplexPropertyAddedConvention, IComplexPropertyFieldChangedConvention, IConvention
Inheritance
PropertyAttributeConventionBase<BsonRequiredAttribute>
BsonRequiredPropertyAttributeConvention
Implements
Inherited Members

Constructors

BsonRequiredPropertyAttributeConvention(ProviderConventionSetBuilderDependencies)

Creates a new instance of BsonRequiredPropertyAttributeConvention.

Methods

ProcessPropertyAdded(IConventionComplexPropertyBuilder, BsonRequiredAttribute, MemberInfo, IConventionContext)

Called after a complex property is added to a type with an attribute on the associated CLR property or field.

ProcessPropertyAdded(IConventionPropertyBuilder, BsonRequiredAttribute, MemberInfo, IConventionContext)

Called after a property is added to the entity type with an attribute on the associated CLR property or field.