mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2026-01-26 21:38:32 +08:00
code optimization
This commit is contained in:
@@ -593,9 +593,10 @@ namespace SqlSugar
|
|||||||
}
|
}
|
||||||
public void ChangeDatabase(dynamic configId)
|
public void ChangeDatabase(dynamic configId)
|
||||||
{
|
{
|
||||||
|
configId =Convert.ToString(configId);
|
||||||
var isLog = _Context.Ado.IsEnableLogEvent;
|
var isLog = _Context.Ado.IsEnableLogEvent;
|
||||||
Check.Exception(!_AllClients.Any(it => it.ConnectionConfig.ConfigId == configId), "ConfigId was not found {0}", configId);
|
Check.Exception(!_AllClients.Any(it =>Convert.ToString( it.ConnectionConfig.ConfigId) == configId), "ConfigId was not found {0}", configId);
|
||||||
InitTenant(_AllClients.First(it => it.ConnectionConfig.ConfigId == configId));
|
InitTenant(_AllClients.First(it => Convert.ToString(it.ConnectionConfig.ConfigId )== configId));
|
||||||
if (this._IsAllTran)
|
if (this._IsAllTran)
|
||||||
this.Ado.BeginTran();
|
this.Ado.BeginTran();
|
||||||
if (this._IsOpen)
|
if (this._IsOpen)
|
||||||
|
|||||||
Reference in New Issue
Block a user