Dictionary in Mongo c# driver

Hello,

I’m Using mongo c# driver v2.11.3. i just want insert dictionary in database.
and the dictionary is Dictionary<string,decimal>. i just simply insert string a key of dictionary and decimal a value of dictionary.but when i insert dictionary in database the value of dictionary takes as string.
it cannot store decimal value of dictionary.
here is the dictionary declared.

   [BsonId]
    [BsonRepresentation(BsonType.ObjectId)]
    public string _id { get; set; }
    public string ledgerTemplateId { get; set; }
    public string companyId { get; set; }

    [BsonRepresentation(BsonType.Int32)]
    public int periodId { get; set; }
    public List<CategoryItem> categories { get; set; }

    [BsonRepresentation(BsonType.Decimal128)]
    public decimal openingBalance { get; set; }

    [BsonRepresentation(BsonType.Decimal128)]
    public decimal currentBalance { get; set; }

    [BsonRepresentation(BsonType.Decimal128)]
    public decimal closingBalance { get; set; }
     
    public IDictionary<string, decimal> monthlyBalance { get; set; } = new Dictionary<string, decimal>();

    public IDictionary<string, decimal> dayBalance { get; set; } = new Dictionary<string, decimal>();

here is the sample database record .

in above image you can see the value of dictionary is taking as string.
is there anything which i do for store decimal value of dictionary.
How to do that? What should i do for?
I’'ll eagerly waiting for your response.
Thank you ?

A post was merged into an existing topic: MongoDB Dictionary<string,decimal> store