I have a simple class:
public class Foo
{
public ObjectId Id { get; set; }
public Dictionary<string, object> Bar { get; set; }
}
Nothing else, no custom mappings, etc. When I insert it into MongoDB, it works perfectly, but the Bar property is ignored, although, at insertion time, it is not null. I tried adding [BsonDictionaryOptions] and [BsonElement] but these had no effect.