IMigrator.MigrateAsync(String, CancellationToken) Method

Definition

Migrates the database to either a specified target migration or up to the latest migration that exists in the IMigrationsAssembly.

public System.Threading.Tasks.Task MigrateAsync (string targetMigration = default, System.Threading.CancellationToken cancellationToken = default);
abstract member MigrateAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function MigrateAsync (Optional targetMigration As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task

Parameters

targetMigration
String

The target migration to migrate the database to, or null to migrate to the latest.

cancellationToken
CancellationToken

A CancellationToken to observe while waiting for the task to complete.

Returns

Task

A task that represents the asynchronous operation

Applies to