diff --git a/SqlSugar/ExpressionsToSql/ExpConst.cs b/SqlSugar/ExpressionsToSql/ExpressionConst.cs similarity index 81% rename from SqlSugar/ExpressionsToSql/ExpConst.cs rename to SqlSugar/ExpressionsToSql/ExpressionConst.cs index f3d8c7b76..0b9525a2a 100644 --- a/SqlSugar/ExpressionsToSql/ExpConst.cs +++ b/SqlSugar/ExpressionsToSql/ExpressionConst.cs @@ -5,7 +5,7 @@ using System.Text; namespace SqlSugar { - internal class ExpConst + internal class ExpressionConst { public const string BinaryExpressionInfoListKey = "BinaryExpressionInfoListKey"; public const string BinaryFormatString = " ( {0} {1} {2} ) "; @@ -26,7 +26,7 @@ namespace SqlSugar { get { - return ExpConst.GetThrowMessage("拉姆达解析出错:不支持{0}此种运算符查找!", + return ExpressionConst.GetThrowMessage("拉姆达解析出错:不支持{0}此种运算符查找!", "Lambda parsing error: {0} does not support the operator to find!"); } } @@ -34,7 +34,7 @@ namespace SqlSugar { get { - return ExpConst.GetThrowMessage("Expression format error, correct format: it=>it.fieldName", + return ExpressionConst.GetThrowMessage("Expression format error, correct format: it=>it.fieldName", "表达示格式错误,正确格式: it=>it.fieldName"); } } diff --git a/SqlSugar/ExpressionsToSql/ExpTool.cs b/SqlSugar/ExpressionsToSql/ExpressionTool.cs similarity index 98% rename from SqlSugar/ExpressionsToSql/ExpTool.cs rename to SqlSugar/ExpressionsToSql/ExpressionTool.cs index 82f375d86..395db9c48 100644 --- a/SqlSugar/ExpressionsToSql/ExpTool.cs +++ b/SqlSugar/ExpressionsToSql/ExpressionTool.cs @@ -5,7 +5,7 @@ using System.Linq.Expressions; using System.Text; namespace SqlSugar { - public class ExpTool + public class ExpressionTool { public static string GetOperator(ExpressionType expressiontype) { diff --git a/SqlSugar/ExpressionsToSql/ResolveItems/BinaryExpressionResolve.cs b/SqlSugar/ExpressionsToSql/ResolveItems/BinaryExpressionResolve.cs index 3746f961e..3c9ad59c0 100644 --- a/SqlSugar/ExpressionsToSql/ResolveItems/BinaryExpressionResolve.cs +++ b/SqlSugar/ExpressionsToSql/ResolveItems/BinaryExpressionResolve.cs @@ -11,7 +11,7 @@ namespace SqlSugar { parameter.BinaryExpressionInfoList =new List>(); var expression = this.Expression as BinaryExpression; - var operatorValue = ExpTool.GetOperator(expression.NodeType); + var operatorValue = ExpressionTool.GetOperator(expression.NodeType); var isComparisonOperator = expression.NodeType != ExpressionType.And && expression.NodeType != ExpressionType.AndAlso && @@ -27,22 +27,22 @@ namespace SqlSugar base.IsLeft = null; string leftString = GetLeftString(parameter); string rightString = GetRightString(parameter); - string binarySql =string.Format(ExpConst.BinaryFormatString,leftString,operatorValue,rightString); + string binarySql =string.Format(ExpressionConst.BinaryFormatString,leftString,operatorValue,rightString); string sqlWhereString = base.SqlWhere.ToString(); if (base.SqlWhere == null) { base.SqlWhere = new StringBuilder(); } - if (sqlWhereString.Contains(ExpConst.Format0)) + if (sqlWhereString.Contains(ExpressionConst.Format0)) { - base.SqlWhere.Replace(ExpConst.Format0, sqlWhereString); + base.SqlWhere.Replace(ExpressionConst.Format0, sqlWhereString); } else { base.SqlWhere.Append(binarySql); } - if (sqlWhereString.Contains(ExpConst.Format1)) + if (sqlWhereString.Contains(ExpressionConst.Format1)) { - base.SqlWhere.Replace(ExpConst.Format1, ExpConst.Format0); + base.SqlWhere.Replace(ExpressionConst.Format1, ExpressionConst.Format0); } } diff --git a/SqlSugar/ExpressionsToSql/ResolveItems/MemberExpressionResolve.cs b/SqlSugar/ExpressionsToSql/ResolveItems/MemberExpressionResolve.cs index 0a74bb15f..73975f3e5 100644 --- a/SqlSugar/ExpressionsToSql/ResolveItems/MemberExpressionResolve.cs +++ b/SqlSugar/ExpressionsToSql/ResolveItems/MemberExpressionResolve.cs @@ -14,7 +14,7 @@ namespace SqlSugar var isSingle = parameter.Context.IsSingle; string fieldName = string.Empty; fieldName = isSingle ? expression.Member.Name : expression.Member.ToString(); - parameter.BaseParameter.BinaryExpressionInfoList.Add(new KeyValuePair(ExpConst.BinaryExpressionInfoListKey, new BinaryExpressionInfo() + parameter.BaseParameter.BinaryExpressionInfoList.Add(new KeyValuePair(ExpressionConst.BinaryExpressionInfoListKey, new BinaryExpressionInfo() { IsLeft = Convert.ToBoolean(IsLeft), Value = fieldName, diff --git a/SqlSugar/SqlSugar.csproj b/SqlSugar/SqlSugar.csproj index c49486d25..035505208 100644 --- a/SqlSugar/SqlSugar.csproj +++ b/SqlSugar/SqlSugar.csproj @@ -109,7 +109,7 @@ - + @@ -121,7 +121,7 @@ - +