public bool DatabaseExists() { string databaseName = database.GetDatabaseName(connectionString); logger.LogInformation($"connectionString:{connectionString}"); logger.LogInformation($"connectionStringMaster:{connectionStringMaster}"); string connectionStringMasterPostgres = database.GetConnectionStringWithDefaultDatabaseName(connectionStringMaster); logger.LogInformation($"Trying to connect to DB: '{connectionStringMasterPostgres}'"); return(database.DatabaseExists(connectionStringMasterPostgres ?? connectionString, databaseName)); }