diff --git a/Src/Asp.NetCore2/SqlSugar/SqlSugarClient.cs b/Src/Asp.NetCore2/SqlSugar/SqlSugarClient.cs index 23509a29f..4d55c87e4 100644 --- a/Src/Asp.NetCore2/SqlSugar/SqlSugarClient.cs +++ b/Src/Asp.NetCore2/SqlSugar/SqlSugarClient.cs @@ -9,6 +9,7 @@ using System.Reflection; using System.Text; using System.Threading; using System.Threading.Tasks; +using System.Xml.Schema; namespace SqlSugar { @@ -842,6 +843,10 @@ namespace SqlSugar #endregion #region More api + public string[] GetCurrentConfigIds() + { + return _AllClients.Select(it=>it.ConnectionConfig.ConfigId+string.Empty).ToArray(); + } public IContextMethods Utilities { get { return this.Context.Utilities; } set { this.Context.Utilities = value; } } public AopProvider Aop => this.Context.Aop; public ICodeFirst CodeFirst => this.Context.CodeFirst; diff --git a/Src/Asp.NetCore2/SqlSugar/SqlSugarScope.cs b/Src/Asp.NetCore2/SqlSugar/SqlSugarScope.cs index 922dec465..d07d67f43 100644 --- a/Src/Asp.NetCore2/SqlSugar/SqlSugarScope.cs +++ b/Src/Asp.NetCore2/SqlSugar/SqlSugarScope.cs @@ -917,5 +917,9 @@ namespace SqlSugar { ScopedContext.ClearTracking(); } + public string[] GetCurrentConfigIds() + { + return ScopedContext.GetCurrentConfigIds(); + } } }