mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-19 12:28:15 +08:00
- 修复 UseGenerateCommandParameterWithLambda + Enum + MapType(string) bug;
This commit is contained in:
@ -550,6 +550,20 @@ namespace FreeSql.Internal
|
||||
}
|
||||
public string ExpressionBinary(string oper, Expression leftExp, Expression rightExp, ExpTSC tsc)
|
||||
{
|
||||
if (
|
||||
leftExp.Type == rightExp.Type &&
|
||||
|
||||
leftExp.NodeType == ExpressionType.Convert &&
|
||||
leftExp is UnaryExpression leftExpUexp &&
|
||||
leftExpUexp.Operand?.Type.NullableTypeOrThis().IsEnum == true &&
|
||||
|
||||
rightExp.NodeType == ExpressionType.Convert &&
|
||||
rightExp is UnaryExpression rightExpUexp &&
|
||||
rightExpUexp.Operand?.Type.NullableTypeOrThis().IsEnum == true)
|
||||
{
|
||||
leftExp = leftExpUexp.Operand;
|
||||
rightExp = rightExpUexp.Operand;
|
||||
}
|
||||
switch (oper)
|
||||
{
|
||||
case "OR":
|
||||
|
Reference in New Issue
Block a user