Table of Contents

Method CurrentDate

Namespace
MongoDB.Driver.Builders
Assembly
MongoDB.Driver.Legacy.dll

CurrentDate(Expression<Func<TDocument, DateTime>>)

Sets the value of the named element to the current date (see $currentDate).

public UpdateBuilder<TDocument> CurrentDate(Expression<Func<TDocument, DateTime>> memberExpression)

Parameters

memberExpression Expression<Func<TDocument, DateTime>>

The member expression.

Returns

UpdateBuilder<TDocument>

The builder (so method calls can be chained).

CurrentDate(Expression<Func<TDocument, BsonDateTime>>)

Sets the value of the named element to the current date (see $currentDate).

public UpdateBuilder<TDocument> CurrentDate(Expression<Func<TDocument, BsonDateTime>> memberExpression)

Parameters

memberExpression Expression<Func<TDocument, BsonDateTime>>

The member expression.

Returns

UpdateBuilder<TDocument>

The builder (so method calls can be chained).

CurrentDate(Expression<Func<TDocument, BsonTimestamp>>)

Sets the value of the named element to the current date (see $currentDate).

public UpdateBuilder<TDocument> CurrentDate(Expression<Func<TDocument, BsonTimestamp>> memberExpression)

Parameters

memberExpression Expression<Func<TDocument, BsonTimestamp>>

The member expression.

Returns

UpdateBuilder<TDocument>

The builder (so method calls can be chained).