Details
-
New Feature
-
Resolution: Done
-
Minor - P4
-
0.11
-
None
-
None
Description
Support the following:
public class C {
[BsonRepresentation(BsonType.ObjectId)]
public string Id;
// other data
}
This means that the string Id will be represented as an ObjectId in the database but as a string in memory. The value of the string must be a valid string representation of an ObjectId or serialization will throw an exception.