- 修复 实体类拥有构造参数时,ToList\<DTO\> 映射查询无效的 bug;

This commit is contained in:
2881099
2020-11-12 05:11:05 +08:00
parent dad05d83c9
commit 4ef38817ff
2 changed files with 6 additions and 3 deletions

View File

@ -273,9 +273,9 @@ namespace FreeSql.Internal
{
if (a.NodeType != ExpressionType.Constant) return true;
var constVal = (a as ConstantExpression)?.Value;
if (constVal == null) return true;
if (object.Equals(constVal, a.Type.CreateInstanceGetDefaultValue()) == false) return true;
return false;
if (constVal == null) return false; //- 修复 实体类拥有构造参数时ToList\<DTO\> 映射查询无效的 bug
if (object.Equals(constVal, a.Type.CreateInstanceGetDefaultValue())) return false;
return true;
})
))
{