- 优化 ISelect<object> AsType 的父子类转换时的情况;#1427

This commit is contained in:
2881099
2023-02-17 18:35:44 +08:00
parent f295f2cd1a
commit 3d205041b0
3 changed files with 33 additions and 10 deletions

View File

@ -1723,6 +1723,8 @@ namespace FreeSql.Internal
expStack.Push(oper2Parm);
else if (oper2Parm.Type != typeof(object) && oper2Parm.Type.IsAssignableFrom(exp2.Type))
expStack.Push(oper2Parm);
else if (oper2Parm.Type == typeof(object) && tsc._tables[0].Table != null && exp2.Type.IsAssignableFrom(tsc._tables[0].Table.Type) == true)
expStack.Push(oper2Parm);
else
expStack.Push(Expression.Parameter(exp2.Type, oper2Parm.Name));
}