I am now making a MMO game using Unity.
Also I am using the LiteDB to store users data.
UserModel looks like this.

Everything is working correctly except for the mUserOwnerClientId. The variable type is ulong and I tried to store ulong.MaxValue. But the stored value was -1 and when I tried to read from database, there was an error because ulong could not be less than zero.

So I have a question here.
Does LiteDB support ulong storing?
LiteDB supports long by default, not ulong (unsigned).
But you can tell it how to handle the serialization and deserialization of a type it doesn't know with BsonMapper before using your database:
Then when you want to use queries you can use the BsonMapper again: