Browse Source

Update childDb.AsTenant()

pull/40/head
sunkaixuan 1 year ago
parent
commit
79a0de3b80
  1. 11
      Src/Asp.NetCore2/SqlSugar/Abstract/SugarProvider/SqlSugarProvider.cs

11
Src/Asp.NetCore2/SqlSugar/Abstract/SugarProvider/SqlSugarProvider.cs

@ -1664,8 +1664,15 @@ namespace SqlSugar
#region AsTenant
public ITenant AsTenant()
{
Check.Exception(true,ErrorMessage.GetThrowMessage("Child objects do not support tenant methods, var childDb= Db.GetConnection(confid) ,Db is master ", "Db子对象不支持租户方法,请使用主对象,例如:var childDb= Db.GetConnection(confid) Db是主对象,childDb是子对象 "));
return null;
if (this.Root != null)
{
return this.Root;
}
else
{
Check.Exception(true, ErrorMessage.GetThrowMessage("Child objects do not support tenant methods, var childDb= Db.GetConnection(confid) ,Db is master ", "Db子对象不支持租户方法,请使用主对象,例如:var childDb= Db.GetConnection(confid) Db是主对象,childDb是子对象 "));
return null;
}
}
#endregion

Loading…
Cancel
Save