mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-29 10:49:36 +08:00
Update navigate query
This commit is contained in:
parent
cccb1d06c3
commit
10118b26c9
@ -120,12 +120,12 @@ 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.Where(it=> it.GetType().GetProperty(navObjectName).GetValue(it)!=null).SelectMany(it => (it.GetType().GetProperty(navObjectName).GetValue(it) as IList).Cast<object>()).ToList();
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
list = currentList.Select(it => (it.GetType().GetProperty(navObjectName).GetValue(it))).ToList();
|
||||
list = currentList.Where(it=>it.GetType().GetProperty(navObjectName).GetValue(it)!=null).Select(it => (it.GetType().GetProperty(navObjectName).GetValue(it))).ToList();
|
||||
}
|
||||
|
||||
return list;
|
||||
|
Loading…
Reference in New Issue
Block a user