mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-19 20:38:16 +08:00
- 修复 UseGenerateCommandParameterWithLambda + Enum + MapType(string) bug;
This commit is contained in:
@ -169,7 +169,7 @@ public static partial class FreeSqlGlobalExtensions
|
||||
{
|
||||
if (dict.TryGetValue(prop.Name, out var existsProp))
|
||||
{
|
||||
if (existsProp.DeclaringType != prop) dict[prop.Name] = prop;
|
||||
if (existsProp.DeclaringType != prop.DeclaringType) dict[prop.Name] = prop;
|
||||
continue;
|
||||
}
|
||||
dict.Add(prop.Name, prop);
|
||||
|
@ -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