Interface IMigrationBuilder
The fluent, typed surface a Migration declares its work through — no query strings, no field-name literals. Every operation is recorded and later applied by a provider's IMigrationExecutor.
public interface IMigrationBuilder
Properties
Operations
The operations declared so far, in order.
IReadOnlyList<MigrationOperation> Operations { get; }
Property Value
Methods
For<TEntity>(Action<ICollectionMigration<TEntity>>)
Declares operations against the TEntity collection/container.
IMigrationBuilder For<TEntity>(Action<ICollectionMigration<TEntity>> configure) where TEntity : class
Parameters
configureAction<ICollectionMigration<TEntity>>The fluent configuration.
Returns
- IMigrationBuilder
The same builder for chaining.
Type Parameters
TEntityThe entity type.
Run(Func<IMigrationExecutionContext, CancellationToken, Task>)
Declares an arbitrary escape-hatch step with direct provider access.
IMigrationBuilder Run(Func<IMigrationExecutionContext, CancellationToken, Task> operation)
Parameters
operationFunc<IMigrationExecutionContext, CancellationToken, Task>The action to run.
Returns
- IMigrationBuilder
The same builder for chaining.