Add db.GetCurrentConfigIds

This commit is contained in:
sunkaixuan
2024-08-21 11:46:41 +08:00
parent 94ab4c108c
commit 991f9fe44c
2 changed files with 9 additions and 0 deletions

View File

@@ -9,6 +9,7 @@ using System.Reflection;
using System.Text; using System.Text;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Xml.Schema;
namespace SqlSugar namespace SqlSugar
{ {
@@ -842,6 +843,10 @@ namespace SqlSugar
#endregion #endregion
#region More api #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 IContextMethods Utilities { get { return this.Context.Utilities; } set { this.Context.Utilities = value; } }
public AopProvider Aop => this.Context.Aop; public AopProvider Aop => this.Context.Aop;
public ICodeFirst CodeFirst => this.Context.CodeFirst; public ICodeFirst CodeFirst => this.Context.CodeFirst;

View File

@@ -917,5 +917,9 @@ namespace SqlSugar
{ {
ScopedContext.ClearTracking(); ScopedContext.ClearTracking();
} }
public string[] GetCurrentConfigIds()
{
return ScopedContext.GetCurrentConfigIds();
}
} }
} }