mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-01 18:59:35 +08:00
Crosss database query
This commit is contained in:
parent
7be5aa65e1
commit
c1c74ff9da
@ -718,6 +718,11 @@ namespace SqlSugar
|
||||
{
|
||||
return db;
|
||||
}
|
||||
}
|
||||
else if (this.CrossQueryItems!=null&& this.CrossQueryItems.Count>0&&this.CrossQueryItems.ContainsKey(type.FullName))
|
||||
{
|
||||
var result= db.Root.GetConnection(this.CrossQueryItems[type.FullName]);
|
||||
return result;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -57,6 +57,12 @@ namespace SqlSugar
|
||||
}
|
||||
public ISugarQueryable<T> CrossQuery(Type type, string configId)
|
||||
{
|
||||
if (this.QueryBuilder.CrossQueryItems == null)
|
||||
{
|
||||
this.QueryBuilder.CrossQueryItems = new Dictionary<string, string>();
|
||||
}
|
||||
if(!this.QueryBuilder.CrossQueryItems.ContainsKey(type.FullName))
|
||||
this.QueryBuilder.CrossQueryItems.Add(type.FullName, configId);
|
||||
return this;
|
||||
}
|
||||
public ISugarQueryable<T> IncludeLeftJoin(Expression<Func<T, object>> LeftObject)
|
||||
|
Loading…
Reference in New Issue
Block a user