C# driver support for BigInt SchemaType

Mongoose 7.1.0 was released on April 27, 2023 and includes a couple of interesting new features. The most interesting new feature is BigInt support.
we are missing this support in c# driver

Hi @Mohamadreza_Nakhleh,

Welcome to the MongoDB Community Forums! Even though BigInt has been a part of the .NET ecosystem for some time now, the default behavior around its serialization is use case specific and hence the C# Driver does not support it yet. A workaround to do so is using custom serialization as seen here. You can even use StructSerializerBase as it provides more boilerplate code that you need when serializing value types like BigInteger. Hope that helps. If you still think that this is an important feature, please feel free to raise a ticket here.

Thanks,

Rishit.

The problem with custom serialization is that finally data would be saved as string on mongodb and there would be no number based queries for those fields on server side queries.