Table of Contents

Class RenameFieldOperation

Namespace
eQuantic.Core.Data.Migration
Assembly
eQuantic.Core.Data.Abstractions.dll

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

entityType Type

The entity type.

field LambdaExpression

The field selector, resolved against the model as it stands.

newName string

The new field name.

RenameFieldOperation(Type, string, string)

Initializes the operation with both names stated outright.

public RenameFieldOperation(Type entityType, string currentName, string newName)

Parameters

entityType Type

The entity type.

currentName string

The name the field is stored under today.

newName string

The 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

string

Field

The field selector, when the source is resolved from the model. null when it was stated.

public LambdaExpression? Field { get; }

Property Value

LambdaExpression

NewName

The new field name.

public string NewName { get; }

Property Value

string