Upddate exp to sql

This commit is contained in:
sunkaixuan 2023-10-16 20:08:14 +08:00
parent 21bc55aa9a
commit 06c539805e

View File

@ -85,10 +85,15 @@ namespace SqlSugar
var leftChild = ExpressionTool.RemoveConvert((left as BinaryExpression).Right); var leftChild = ExpressionTool.RemoveConvert((left as BinaryExpression).Right);
var rightChild = ExpressionTool.RemoveConvert((right as BinaryExpression).Right); var rightChild = ExpressionTool.RemoveConvert((right as BinaryExpression).Right);
if (ExpressionTool.GetMethodName(leftChild)=="Select" var isLeftSelect = ExpressionTool.GetMethodName(leftChild) == "Select";
&& ExpressionTool.GetMethodName(rightChild) == "Select" var isRightSelect = ExpressionTool.GetMethodName(rightChild) == "Select";
&& ExpressionTool.ContainsMethodName(left as BinaryExpression, "Group") var isLeftGroup = ExpressionTool.ContainsMethodName(left as BinaryExpression, "Group");
&&ExpressionTool.ContainsMethodName(right as BinaryExpression, "Group")) var isRightGroup = ExpressionTool.ContainsMethodName(right as BinaryExpression, "Group");
if (
(isLeftSelect && isLeftGroup)
||
(isRightSelect && isRightGroup)
)
{ {
return true; return true;
} }