Update exp to sql

This commit is contained in:
sunkaixuna 2022-01-15 17:33:47 +08:00
parent d06cb08e0d
commit d603994ac6
2 changed files with 2 additions and 2 deletions

View File

@ -19,7 +19,7 @@ namespace SqlSugar
public virtual string IsNullOrEmpty(MethodCallExpressionModel model)
{
var parameter = model.Args[0];
return string.Format("( {0}='' OR {0} IS NULL )", parameter.MemberName);
return string.Format("( {0} IS NULL OR {0}='')", parameter.MemberName);
}
public virtual string HasValue(MethodCallExpressionModel model)

View File

@ -483,7 +483,7 @@ namespace SqlSugar
}
}
}
else if (item.Type == UtilConstants.BoolType && item is MethodCallExpression && (item as MethodCallExpression).Method.Name == "Any"&&IsSubMethod(item as MethodCallExpression))
else if (item.Type == UtilConstants.BoolType && item is MethodCallExpression)
{
this.Expression = item;
this.Start();