Update .net

This commit is contained in:
sunkaixuna
2022-01-15 18:04:50 +08:00
parent 483f75ee65
commit 6307552929

View File

@@ -483,7 +483,7 @@ namespace SqlSugar
}
}
}
else if (item.Type == UtilConstants.BoolType && item is MethodCallExpression)
else if (item.Type == UtilConstants.BoolType && item is MethodCallExpression && IsNotCaseExpression(item))
{
this.Expression = item;
this.Start();
@@ -518,6 +518,22 @@ namespace SqlSugar
}
}
private static bool IsNotCaseExpression(Expression item)
{
if ((item as MethodCallExpression).Method.Name == "IIF")
{
return false;
}
else if ((item as MethodCallExpression).Method.Name == "End"&&item.ToString().Contains("IF("))
{
return false;
}
else
{
return true;
}
}
private Dictionary<string, string> GetMappingColumns(Expression currentExpression)
{
Dictionary<string, string> result = new Dictionary<string, string>();