mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-19 20:38:16 +08:00
- 修复 IIF 三元表达式树解析 bool HasValue 问题;
This commit is contained in:
@ -691,7 +691,7 @@ namespace FreeSql.Internal
|
||||
}
|
||||
}
|
||||
}
|
||||
if (leftExp.Type.NullableTypeOrThis() == typeof(bool) && (leftExp.NodeType != ExpressionType.MemberAccess && rightExp.NodeType != ExpressionType.MemberAccess))
|
||||
if (leftExp.Type.NullableTypeOrThis() == typeof(bool) && (left.EndsWith(" IS NOT NULL") || left.EndsWith(" IS NULL") || leftExp.NodeType != ExpressionType.MemberAccess && rightExp.NodeType != ExpressionType.MemberAccess))
|
||||
{
|
||||
var leftExpCall = leftExp as MethodCallExpression;
|
||||
if (leftExpCall == null || !(leftExpCall.Method.DeclaringType == typeof(SqlExt) && leftExpCall.Method.Name == nameof(SqlExt.IsNull)))
|
||||
|
Reference in New Issue
Block a user