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
updateUpdateDefinition<TDocument>The update.
fieldFieldDefinition<TDocument>The field.
newNamestringThe new name.
Returns
- UpdateDefinition<TDocument>
A combined update.
Type Parameters
TDocumentThe 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
updateUpdateDefinition<TDocument>The update.
fieldExpression<Func<TDocument, object>>The field.
newNamestringThe new name.
Returns
- UpdateDefinition<TDocument>
A combined update.
Type Parameters
TDocumentThe type of the document.