File tree Expand file tree Collapse file tree
src/Infrastructure/Persistence/Initialization Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,18 +24,18 @@ public async Task InitializeAsync(CancellationToken cancellationToken)
2424 {
2525 if ( _dbContext . Database . GetMigrations ( ) . Any ( ) )
2626 {
27- if ( _dbContext . Database . GetPendingMigrations ( ) . Any ( ) )
27+ if ( ( await _dbContext . Database . GetPendingMigrationsAsync ( cancellationToken ) ) . Any ( ) )
2828 {
2929 _logger . LogInformation ( "Applying Migrations for '{tenantId}' tenant." , _currentTenant . Id ) ;
3030 await _dbContext . Database . MigrateAsync ( cancellationToken ) ;
3131 }
3232
33- if ( _dbContext . Database . CanConnect ( ) )
33+ if ( await _dbContext . Database . CanConnectAsync ( cancellationToken ) )
3434 {
3535 _logger . LogInformation ( "Connection to {tenantId}'s Database Succeeded." , _currentTenant . Id ) ;
3636
3737 await _dbSeeder . SeedDatabaseAsync ( _dbContext , cancellationToken ) ;
3838 }
3939 }
4040 }
41- }
41+ }
You can’t perform that action at this time.
0 commit comments