Browse Source

Update exp to sql

pull/12/head
sunkaixuna 3 years ago
parent
commit
d603994ac6
  1. 2
      Src/Asp.Net/SqlSugar/ExpressionsToSql/DbMethods/DefaultDbMethod.cs
  2. 2
      Src/Asp.Net/SqlSugar/ExpressionsToSql/ResolveItems/BaseResolve.cs

2
Src/Asp.Net/SqlSugar/ExpressionsToSql/DbMethods/DefaultDbMethod.cs

@ -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)

2
Src/Asp.Net/SqlSugar/ExpressionsToSql/ResolveItems/BaseResolve.cs

@ -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();

Loading…
Cancel
Save