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

Add BsonIgnoreIfDefault Attribute

    • Type: Icon: New Feature New Feature
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.4
    • Affects Version/s: 1.3.1
    • Component/s: None
    • Environment:
      C#

      We need a BsonIgnoreIfDefault attribute. To work exactly the same as the BsonIgnoreIfNull attribute. I constantly am putting Nullable<> types in my data model to keep rarely used properties out of the database. But on the UI I have to do special magic in a ViewModel to make the type not Nullable. This would be most usefull for Bool Flags that you only care about when they are True. but also usefull for the other built in struct types.

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

              Created:
              Updated:
              Resolved: