mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-06-28 13:34:32 +08:00
Update exp to sql
This commit is contained in:
parent
c094ba5e11
commit
5a51a96b94
@ -46,12 +46,14 @@ namespace SqlSugar
|
||||
if (expArgs != null && expArgs.Any())
|
||||
{
|
||||
var meExp = expArgs[0] as LambdaExpression;
|
||||
if (meExp != null)
|
||||
{
|
||||
var selfParameterName = meExp.Parameters.First().Name;
|
||||
if ((meExp.Body is BinaryExpression))
|
||||
{
|
||||
context.SingleTableNameSubqueryShortName = (((meExp.Body as BinaryExpression).Left as MemberExpression)?.Expression as ParameterExpression)?.Name;
|
||||
}
|
||||
if (ExpressionTool.GetMethodName(context.Expression).IsContainsIn("ToList")&& meExp.Parameters.Any(it=>it.Name==selfParameterName))
|
||||
if (ExpressionTool.GetMethodName(context.Expression).IsContainsIn("ToList") && meExp.Parameters.Any(it => it.Name == selfParameterName))
|
||||
{
|
||||
if (meExp.Body is BinaryExpression)
|
||||
{
|
||||
@ -67,6 +69,7 @@ namespace SqlSugar
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (context.Expression.GetType().Name == "MethodBinaryExpression")
|
||||
{
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user