- 修复 AggregateRoot 自动 Attach 问题;

This commit is contained in:
2881099 2022-09-08 22:09:16 +08:00
parent 73d8edbd52
commit 3ec8e2118d

View File

@ -196,9 +196,11 @@ namespace FreeSql
protected void SelectAggregateRootTracking(object list)
{
if (list == null) return;
var ls = list as IEnumerable<TEntity>;
if (ls == null)
if (list is IEnumerable<TEntity> entities)
{
Attach(entities);
return;
}
var ie = list as IEnumerable;
if (ie == null) return;
var isfirst = true;
@ -217,8 +219,6 @@ namespace FreeSql
if (item is TEntity item2) Attach(item2);
else return;
}
return;
}
}
//void SelectAggregateRootNavigateReader<T1>(ISelect<T1> currentQuery, Type entityType, string navigatePath, Stack<Type> ignores)
//{