.Net system.DBNull can not converting to BsonValue

86 views
Skip to first unread message

Vishal Patel

unread,
Oct 5, 2016, 5:22:50 PM10/5/16
to mongodb-user
.Net system.DBNull can not converting to BsonValue

Wan Bachtiar

unread,
Oct 12, 2016, 10:38:49 PM10/12/16
to mongodb-user

.Net system.DBNull can not converting to BsonValue

Hi Vishal,

DBNull.Value is an indication that a value is missing. Depending on your use case, you could detect if it is (i.e. using Convert.IsDBNull ) and create a BsonNull.Value instead.

Could you provide the following relevant information:

  • MongoDB .Net driver version.

  • Snippet .Net code example of your use case.

  • Example data document.

Regards,

Wan.

Reply all
Reply to author
Forward
0 new messages