Browse Source

Update exp to sql

pull/17/head
sunkaixuan 3 years ago
parent
commit
962625f9bf
  1. 4
      Src/Asp.Net/SqlSugar/ExpressionsToSql/ResolveItems/MethodCallExpressionResolve.cs

4
Src/Asp.Net/SqlSugar/ExpressionsToSql/ResolveItems/MethodCallExpressionResolve.cs

@ -589,6 +589,10 @@ namespace SqlSugar
IsMember = parameter.ChildExpression is MemberExpression && !ExpressionTool.IsConstExpression(parameter.ChildExpression as MemberExpression), IsMember = parameter.ChildExpression is MemberExpression && !ExpressionTool.IsConstExpression(parameter.ChildExpression as MemberExpression),
MemberName = parameter.CommonTempData MemberName = parameter.CommonTempData
}; };
if(methodCallExpressionArgs.MemberName is MapperSql)
{
methodCallExpressionArgs.MemberName = (methodCallExpressionArgs.MemberName as MapperSql).Sql;
}
if (methodCallExpressionArgs.IsMember && parameter.ChildExpression != null && parameter.ChildExpression.ToString() == "DateTime.Now") if (methodCallExpressionArgs.IsMember && parameter.ChildExpression != null && parameter.ChildExpression.ToString() == "DateTime.Now")
{ {
methodCallExpressionArgs.IsMember = false; methodCallExpressionArgs.IsMember = false;

Loading…
Cancel
Save