Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-172

Support storing ObjectId as String in memory so domain classes don't depend on driver

    • Type: Icon: New Feature New Feature
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.0
    • 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.

            Assignee:
            robert@mongodb.com Robert Stam
            Reporter:
            robert@mongodb.com Robert Stam
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: