Details
-
Task
-
Resolution: Done
-
Major - P3
-
None
-
None
-
None
Description
I have Enum:
{{}}
public enum SomeType |
{
|
TypeA,
|
TypeB,
|
TypeC
|
}
|
{{}}
but in MongoDB i would like this map to: type_a type_b type_c
I'm using EnumRepresentationConvention(BsonType.String)
I tried:
{{}}
public enum SomeType |
{
|
[BsonElement("type_a")] |
TypeA,
|
[BsonElement("type_b")] |
TypeB,
|
[BsonElement("type_c")] |
TypeC
|
}
|
{{}}
but this doesn't work. Im getting exception:
Requested value 'type_a' was not found.
Is anyone know how can achieve such mapping in MongoDb C# driver?