Method CurrentDate
CurrentDate<TDocument>(UpdateDefinition<TDocument>, FieldDefinition<TDocument>, UpdateDefinitionCurrentDateType?)
Combines an existing update with a current date operator.
public static UpdateDefinition<TDocument> CurrentDate<TDocument>(this UpdateDefinition<TDocument> update, FieldDefinition<TDocument> field, UpdateDefinitionCurrentDateType? type = null)
Parameters
updateUpdateDefinition<TDocument>The update.
fieldFieldDefinition<TDocument>The field.
typeUpdateDefinitionCurrentDateType?The type.
Returns
- UpdateDefinition<TDocument>
A combined update.
Type Parameters
TDocumentThe type of the document.
CurrentDate<TDocument>(UpdateDefinition<TDocument>, Expression<Func<TDocument, object>>, UpdateDefinitionCurrentDateType?)
Combines an existing update with a current date operator.
public static UpdateDefinition<TDocument> CurrentDate<TDocument>(this UpdateDefinition<TDocument> update, Expression<Func<TDocument, object>> field, UpdateDefinitionCurrentDateType? type = null)
Parameters
updateUpdateDefinition<TDocument>The update.
fieldExpression<Func<TDocument, object>>The field.
typeUpdateDefinitionCurrentDateType?The type.
Returns
- UpdateDefinition<TDocument>
A combined update.
Type Parameters
TDocumentThe type of the document.