Update Subquery.EnableTableFilter()

This commit is contained in:
sunkaixuan 2023-02-21 16:38:19 +08:00
parent cbdd786363
commit 08acec50ef

View File

@ -56,7 +56,7 @@ namespace SqlSugar
if (field != null) if (field != null)
{ {
Type ChildType = item.GetType().GetProperty("type", flag).GetValue(item, null) as Type; Type ChildType = item.GetType().GetProperty("type", flag).GetValue(item, null) as Type;
if (ChildType == type|| ChildType.IsInterface) if (ChildType == type|| (ChildType.IsInterface&&type.GetInterfaces().Contains(ChildType)))
{ {
var entityInfo = db.EntityMaintenance.GetEntityInfo(ChildType); var entityInfo = db.EntityMaintenance.GetEntityInfo(ChildType);
var exp = field.GetValue(item, null) as Expression; var exp = field.GetValue(item, null) as Expression;