Update nav query

This commit is contained in:
sunkaixuan
2022-04-21 16:13:08 +08:00
parent 10cebe4823
commit 84e4e69b84

View File

@@ -57,7 +57,7 @@ namespace SqlSugar
List<object> list = new List<object>();
if (isList)
{
list = currentList.SelectMany(it => (it.GetType().GetProperty(navObjectName).GetValue(it) as IList).Cast<object>()).ToList();
list = currentList.SelectMany(it => (it.GetType().GetProperty(navObjectName).GetValue(it) as IList)?.Cast<object>()??new List<object> { }).ToList();
}
else