-
-
Couldn't load subscription status.
- Fork 35
Description
As MongoFramework implements its own mapping system, its time to replace the AutoMap call using the MongoDB convention pack.
The DefaultConventionPack uses the following:
https://github.com/mongodb/mongo-csharp-driver/blob/5d89fe5d928f8b4ef5476114dea3f9531b8dd94a/src/MongoDB.Bson/Serialization/Conventions/DefaultConventionPack.cs#L37-L47
There is also an AttributeConventionPack however seems mostly superfluous:
https://github.com/mongodb/mongo-csharp-driver/blob/5d89fe5d928f8b4ef5476114dea3f9531b8dd94a/src/MongoDB.Bson/Serialization/Conventions/AttributeConventionPack.cs
Of the default conventions, here is the state of things:
- LookupIdGeneratorConvention : Redundant due to
EntityIdProcessor - StringObjectIdIdGeneratorConvention : Redundant due to
EntityIdProcessor - NamedParameterCreatorMapConvention : Not redundant but not used either (plus likely won't be supported in the future)
- ImmutableTypeClassMapConvention : Not supported by MongoFramework
- IgnoreExtraElementsConvention : Redundant due to
ExtraElementsProcessor - NamedExtraElementsMemberConvention : Partially covered by MongoFramework (we use attributes, they use property name)
- NamedIdMemberConvention : Partially covered by MongoFramework (we use
KeyAttributeinEntityIdProcessor, they use property name) - ReadWriteMemberFinderConvention : Not implemented by MongoFramework