Example #1
0
        internal static void Preview(AppOptions options)
        {
            Console.WriteLine("**************** Starting preview mode...");
            Options = options;

            using (Scope = AppServiceProvider.CreateScope())
            {
                MigrationRunner = Scope.ServiceProvider.GetRequiredService <IMigrationRunner>();
                using (var runnerScope = MigrationRunner.BeginScope())
                {
                    try
                    {
                        MigrationRunner.MigrateUp();
                    }
                    finally
                    {
                        runnerScope.Cancel();
                    }
                }
            }
        }