public async Task <MigrationResult> ExecuteAsync() { if (_connectDb.RequiresMigration()) { await _connectDb.Database.MigrateAsync(); // EF migrations sometimes report back complete before the underlying DB transaction // has completed so stalling a bit. This only affects drop / recreate scenarios. await Task.Delay(1200); return(MigrationResult.Success("Created entity models.")); } return(MigrationResult.Skipped("No action required")); }