Table of Contents

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

dateOnly bool

if set to true the 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

dateOnly bool

if set to true the values will be required to be Date's only (zero time component).

representation BsonType

The representation.

Returns

DateTimeSerializer

The reconfigured serializer.