-
Type: New Feature
-
Resolution: Done
-
Priority: Minor - P4
-
Affects Version/s: 0.11
-
Component/s: None
-
None
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.