mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-05-17 21:49:33 +08:00
Synchronization code
This commit is contained in:
parent
b47aeb810b
commit
3071baa992
@ -654,7 +654,7 @@ ParameterT parameter)
|
|||||||
tableName = this.QueryBuilder.JoinQueryInfos.First().TableName;
|
tableName = this.QueryBuilder.JoinQueryInfos.First().TableName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var current = await this.Context.Queryable<T>().AS(tableName).Filter(null, this.QueryBuilder.IsDisabledGobalFilter).InSingleAsync(primaryKeyValue);
|
var current = await this.Context.Queryable<T>().AS(tableName).WithCacheIF(this.IsCache, this.CacheTime).Filter(null, this.QueryBuilder.IsDisabledGobalFilter).InSingleAsync(primaryKeyValue);
|
||||||
if (current != null)
|
if (current != null)
|
||||||
{
|
{
|
||||||
result.Add(current);
|
result.Add(current);
|
||||||
@ -663,7 +663,7 @@ ParameterT parameter)
|
|||||||
while (parentId != null && await this.Context.Queryable<T>().AS(tableName).Filter(null, this.QueryBuilder.IsDisabledGobalFilter).In(parentId).AnyAsync())
|
while (parentId != null && await this.Context.Queryable<T>().AS(tableName).Filter(null, this.QueryBuilder.IsDisabledGobalFilter).In(parentId).AnyAsync())
|
||||||
{
|
{
|
||||||
Check.Exception(i > 100, ErrorMessage.GetThrowMessage("Dead cycle", "出现死循环或超出循环上限(100),检查最顶层的ParentId是否是null或者0"));
|
Check.Exception(i > 100, ErrorMessage.GetThrowMessage("Dead cycle", "出现死循环或超出循环上限(100),检查最顶层的ParentId是否是null或者0"));
|
||||||
var parent = await this.Context.Queryable<T>().AS(tableName).Filter(null, this.QueryBuilder.IsDisabledGobalFilter).InSingleAsync(parentId);
|
var parent = await this.Context.Queryable<T>().AS(tableName).WithCacheIF(this.IsCache, this.CacheTime).Filter(null, this.QueryBuilder.IsDisabledGobalFilter).InSingleAsync(parentId);
|
||||||
result.Add(parent);
|
result.Add(parent);
|
||||||
parentId = ParentInfo.PropertyInfo.GetValue(parent, null);
|
parentId = ParentInfo.PropertyInfo.GetValue(parent, null);
|
||||||
++i;
|
++i;
|
||||||
|
Loading…
Reference in New Issue
Block a user