Method Rename
Rename<TDocument>(UpdateDefinition<TDocument>, FieldDefinition<TDocument>, string)
Combines an existing update with a field renaming operator.
public static UpdateDefinition<TDocument> Rename<TDocument>(this UpdateDefinition<TDocument> update, FieldDefinition<TDocument> field, string newName)
Parameters
update
UpdateDefinition<TDocument>The update.
field
FieldDefinition<TDocument>The field.
newName
stringThe new name.
Returns
- UpdateDefinition<TDocument>
A combined update.
Type Parameters
TDocument
The type of the document.
Rename<TDocument>(UpdateDefinition<TDocument>, Expression<Func<TDocument, object>>, string)
Combines an existing update with a field renaming operator.
public static UpdateDefinition<TDocument> Rename<TDocument>(this UpdateDefinition<TDocument> update, Expression<Func<TDocument, object>> field, string newName)
Parameters
update
UpdateDefinition<TDocument>The update.
field
Expression<Func<TDocument, object>>The field.
newName
stringThe new name.
Returns
- UpdateDefinition<TDocument>
A combined update.
Type Parameters
TDocument
The type of the document.