Skip to content

Commit 93cdb81

Browse files
committed
CSHARP-1910: Fix documentation that refers to SetRepresentation method that was removed in 2.0.
1 parent 6e44d1f commit 93cdb81

File tree

1 file changed

+1
-1
lines changed
  • Docs/reference/content/reference/bson/mapping

1 file changed

+1
-1
lines changed

Docs/reference/content/reference/bson/mapping/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ In this case, the serializer will convert the [`ObjectId`]({{< apiref "T_MongoDB
615615
BsonClassMap.RegisterClassMap<Employee>(cm =>
616616
{
617617
cm.AutoMap();
618-
cm.IdMemberMap.SetRepresentation(BsonType.ObjectId);
618+
cm.IdMemberMap.SetSerializer(new StringSerializer(BsonType.ObjectId));
619619
});
620620
```
621621

0 commit comments

Comments
 (0)