-
Type: Bug
-
Resolution: Works as Designed
-
Priority: Major - P3
-
None
-
Affects Version/s: 2.2.4, 2.3, 2.4.4
-
Component/s: Configuration, Serialization
-
None
Hello,
my goal is to store all enum types as string in MongoDB instead of the default int storage.
I'm using the following code:
ConventionRegistry.Register("StringEnumConvention", new ConventionPack {new EnumRepresentationConvention(BsonType.String)}, t => true);
This code is executed before the first usage of MongoClient
But looks like this setting is completely ignored. Any ideas?
- duplicates
-
CSHARP-1728 EnumRepresentationConvention doesn't seem to apply during serialization of Dictionary<T, U>() Where T is an Enum
- Closed