Skip to content

Commit 11f5efb

Browse files
committed
BD tech review comments 1
1 parent b6b1942 commit 11f5efb

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

source/fundamentals/serialization/class-mapping.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,8 @@ a class map.
106106
Omit Fields
107107
~~~~~~~~~~~
108108

109-
By default, the driver serializes all fields in your POCOS, whether you
110-
define them or not. You can prevent specified fields from being
111-
serialized by using the ``UnmapMember()`` method when registering a
112-
class map.
109+
You can prevent specified fields from being serialized by using the
110+
``UnmapMember()`` method when registering a class map.
113111

114112
The following example shows how to create a class map to prevent the
115113
``Age`` property from being serialized:

source/fundamentals/serialization/poco.txt

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -436,10 +436,9 @@ the default value (``null``), the driver throws an exception:
436436
Omit Fields
437437
~~~~~~~~~~~
438438

439-
By default, the driver serializes all fields in your POCOS, whether you
440-
define them or not. To prevent the driver from serializing a specified
441-
field, use the ``[BsonIgnore]`` attribute. The following code shows how
442-
you can prevent the driver from serializing the ``YearBuilt`` property:
439+
To prevent the driver from serializing a specified field, use the
440+
``[BsonIgnore]`` attribute. The following code shows how you can prevent
441+
the driver from serializing the ``YearBuilt`` property:
443442

444443
.. code-block:: csharp
445444
:copyable: true
@@ -467,10 +466,10 @@ not saved in MongoDB.
467466
Omit Empty Fields
468467
~~~~~~~~~~~~~~~~~
469468

470-
By default, the driver serializes undefined properties to fields with ``null``
471-
values. To ignore undefined properties during serialization, use the ``[BsonIgnoreIfNull]``
469+
By default, the driver serializes uninitialized properties with ``null``
470+
values. To ignore empty properties during serialization, use the ``[BsonIgnoreIfNull]``
472471
attribute. The following code shows how you can prevent the driver from
473-
serializing the ``Style`` property if it is undefined:
472+
serializing the ``Style`` property if it is uninitialized:
474473

475474
.. code-block:: csharp
476475
:copyable: true
@@ -502,7 +501,7 @@ following example:
502501
.. note:: Numerical Properties
503502

504503
You cannot use the ``[BsonIgnoreIfNull]`` attribute or
505-
``SetIgnoreIfNull()`` method to prevent undefined numerical
504+
``SetIgnoreIfNull()`` method to prevent uninitialized numerical
506505
properties from being serialized unless you mark the properties as
507506
nullable. Instead, use the ``[BsonIgnoreIfDefault]`` attribute or
508507
``SetIgnoreIfDefault()`` class map method, which are described in the

0 commit comments

Comments
 (0)