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
- dateOnlybool
- if 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
- dateOnlybool
- if set to - truethe values will be required to be Date's only (zero time component).
- representationBsonType
- The representation. 
Returns
- DateTimeSerializer
- The reconfigured serializer.