Method WithDateOnly
- Namespace
 - MongoDB.Bson.Serialization.Serializers
 
- Assembly
 - MongoDB.Bson.dll
 
WithDateOnly(bool)
Returns a serializer that has been reconfigured with the specified dateOnly value.
public DateTimeSerializer WithDateOnly(bool dateOnly)
Parameters
dateOnlyboolif set to
truethe values will be required to be Date's only (zero time component).
Returns
- DateTimeSerializer
 The reconfigured serializer.
WithDateOnly(bool, BsonType)
Returns a serializer that has been reconfigured with the specified dateOnly value and representation.
public DateTimeSerializer WithDateOnly(bool dateOnly, BsonType representation)
Parameters
dateOnlyboolif set to
truethe values will be required to be Date's only (zero time component).representationBsonTypeThe representation.
Returns
- DateTimeSerializer
 The reconfigured serializer.