How to deserialize "MongoDB.Bson.ObjectId"

how to deserialization The object "MongoDB.Bson.ObjectId"

I use [Newtonsoft.Json]

public class WebConfig
        public MongoDB.Bson.ObjectId MongoId { get; set; }

“Error converting value “5f3facb172225d2400eed3f9” to type ‘MongoDB.Bson.ObjectId’. Path ‘MongoId’.”

pls help me

I have try it


But i failed…


This worked wonderfully for me. I found a completed version of a class with the same name here

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.