Update Subquery.ToList

This commit is contained in:
sunkaixuan
2022-12-04 00:13:04 +08:00
parent 613f2dac60
commit 52afd68889
2 changed files with 13 additions and 6 deletions

View File

@@ -1534,15 +1534,18 @@ namespace SqlSugar
foreach (var item in result)
{
var setValue = Activator.CreateInstance(itemProperty.PropertyType, true) as IList;
var appindex = 0;
foreach (var appValue in appendValue)
if (appendValue != null)
{
if (appValue[0].Value.ObjToInt() == resIndex)
var appindex = 0;
foreach (var appValue in appendValue)
{
var addItem = list[appindex];
setValue.Add(addItem);
if (appValue[0].Value.ObjToInt() == resIndex)
{
var addItem = list[appindex];
setValue.Add(addItem);
}
appindex++;
}
appindex++;
}
itemProperty.SetValue(item, setValue);
resIndex++;

View File

@@ -108,6 +108,10 @@ namespace SqlSugar
{
result = "distinct "+result;
}
if (this.SubToListParameters != null && this.SubToListParameters.Any())
{
result = SubToListMethod(result);
}
return result;
}
}