mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2026-01-22 02:51:58 +08:00
Optimized code
This commit is contained in:
@@ -444,7 +444,7 @@ WHERE tgrelid = '" + tableName + "'::regclass");
|
|||||||
}
|
}
|
||||||
var oldDatabaseName = this.Context.Ado.Connection.Database;
|
var oldDatabaseName = this.Context.Ado.Connection.Database;
|
||||||
var connection = this.Context.CurrentConnectionConfig.ConnectionString;
|
var connection = this.Context.CurrentConnectionConfig.ConnectionString;
|
||||||
if (this.Context.CurrentConnectionConfig?.MoreSettings?.DatabaseModel == DbType.SqlServer)
|
if (IsSqlServerModel())
|
||||||
{
|
{
|
||||||
connection = connection.Replace(oldDatabaseName, "master");
|
connection = connection.Replace(oldDatabaseName, "master");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user