BsonIgnoreIfEmpty - Property Attribute
Like BsonIgnoreIfDefault and BsonIgnoreIfNull, we can add BsonIgnoreIfEmpty.
It can be added on IEnumerables (which we basically know they cannot have infinite values since it is inserted to db after all..) and if the IEnumerable is empty, it wont serialize it to the db BUT will know to put default value (an empty list for example) in said property.
They will decrease below boilerplate code for IEnumerable<T>:
Field = otherField?.count > 0 ? otherFIeld : null;
otherField = Field ?? new List<T>;
Obviously, we can improve this code to also support Dictionary<Tkey, Tvalue>.