Optimized code

This commit is contained in:
sunkaixuan 2024-07-11 10:16:40 +08:00
parent 3c98078075
commit 8e934f8d87

View File

@ -444,7 +444,7 @@ WHERE tgrelid = '" + tableName + "'::regclass");
}
var oldDatabaseName = this.Context.Ado.Connection.Database;
var connection = this.Context.CurrentConnectionConfig.ConnectionString;
if (this.Context.CurrentConnectionConfig?.MoreSettings?.DatabaseModel == DbType.SqlServer)
if (IsSqlServerModel())
{
connection = connection.Replace(oldDatabaseName, "master");
}