diff --git a/SqlSugar/ExpressionsToSql/Common/ExpressionErrorMessage.cs b/SqlSugar/ExpressionsToSql/Common/ExpressionErrorMessage.cs index c5a1a8ed9..0ec70f3c7 100644 --- a/SqlSugar/ExpressionsToSql/Common/ExpressionErrorMessage.cs +++ b/SqlSugar/ExpressionsToSql/Common/ExpressionErrorMessage.cs @@ -26,7 +26,7 @@ namespace SqlSugar { get { - return ExpressionConst.GetThrowMessage("Expression parsing does not support the current function. There are many functions available in the SqlFunc class, for example, it=>SqlFunc.HasValue(it.Id)", "拉姆达解析不支持当前函数,SqlFunc这个类里面有大量函数可用,例如 it=>SqlFunc.HasValue(it.Id)"); + return ExpressionConst.GetThrowMessage("Expression parsing does not support the current function {0}. There are many functions available in the SqlFunc class, for example, it=>SqlFunc.HasValue(it.Id)", "拉姆达解析不支持当前函数{0},SqlFunc这个类里面有大量函数可用,也许有你想要的,例如: it=>SqlFunc.HasValue(it.Id)"); } } } diff --git a/SqlSugar/ExpressionsToSql/ResolveItems/MethodCallExpressionResolve.cs b/SqlSugar/ExpressionsToSql/ResolveItems/MethodCallExpressionResolve.cs index 3abd1d6d3..64b5b111a 100644 --- a/SqlSugar/ExpressionsToSql/ResolveItems/MethodCallExpressionResolve.cs +++ b/SqlSugar/ExpressionsToSql/ResolveItems/MethodCallExpressionResolve.cs @@ -257,7 +257,7 @@ namespace SqlSugar private void CheckMethod(MethodCallExpression expression) { - Check.Exception(expression.Method.ReflectedType.FullName != ExpressionConst.SqlFuncFullName,expression.Method.Name+ " no support." + ExpressionErrorMessage.MethodError); + Check.Exception(expression.Method.ReflectedType.FullName != ExpressionConst.SqlFuncFullName,string.Format(ExpressionErrorMessage.MethodError, expression.Method.Name)); } } }