I am working on creating a C# .NET application that will be storing data in Mongo. This application will be storing documents that have extra elements that are complex objects, and I have added [BsonExtraElements] to the Dictionary that contains the extra elements. However, what is actually being stored is not what I am expecting. I can see the top level fields of the extra data but then there are just a lot of empty arrays.
The extra data being passed in:
{
"Suppression": {
"Id": 0,
"Name": "string",
"Description": "string",
"AssetKey": "string",
"Prod": true,
"StartTime": "2020-11-05T22:16:32.452Z",
"EndTime": "2020-11-05T22:16:32.452Z",
"EnteredBy": "string",
"EnteredTime": "2020-11-05T22:16:32.452Z",
"Status": true,
"PlannedMaintenance": true
},
"Filters": [
{
"Type": "string",
"Value": "string"
}
]
}
Compared with how these are stored in the database
"Suppression": [
[
[]
],
[
[]
],
[
[]
],
[
[]
],
[
[]
],
[
[]
],
[
[]
],
[
[]
],
[
[]
],
[
[]
],
[
[]
]
],
"Filters": [
[
[
[]
],
[
[]
]
]
]