Class RenameFieldOperation
Renames a field across existing documents.
public sealed class RenameFieldOperation : MigrationOperation
- Inheritance
-
RenameFieldOperation
- Inherited Members
Constructors
RenameFieldOperation(Type, LambdaExpression, string)
Initializes the operation, taking the field's current name from the model.
public RenameFieldOperation(Type entityType, LambdaExpression field, string newName)
Parameters
entityTypeTypeThe entity type.
fieldLambdaExpressionThe field selector, resolved against the model as it stands.
newNamestringThe new field name.
RenameFieldOperation(Type, string, string)
Initializes the operation with both names stated outright.
public RenameFieldOperation(Type entityType, string currentName, string newName)
Parameters
entityTypeTypeThe entity type.
currentNamestringThe name the field is stored under today.
newNamestringThe new field name.
Properties
CurrentName
The name the field is stored under today, when stated outright. null when it comes from
Field instead.
public string? CurrentName { get; }
Property Value
Field
The field selector, when the source is resolved from the model. null when it was stated.
public LambdaExpression? Field { get; }
Property Value
NewName
The new field name.
public string NewName { get; }