I encountered this error while working with MongoDB Official C# Driver. This error occured when I was trying you insert some test data into a collection. Here’s the snap of error it shown
Later in the course I figured out i was using BsonReprentation Attribute to decorate the Bson data type as objectId.
When I changed the attribute to BsonId it started working fine.
Below is my model before and after the changes.
Hope it helps somebody!