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

Add BsonIgnoreIfDefault Attribute

    XMLWordPrintableJSON

Details

    • Icon: New Feature New Feature
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • 1.4
    • 1.3.1
    • None
    • C#

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: