diff --git a/Src/Asp.NetCore2/SqlSugar/Abstract/SqlBuilderProvider/SqlBuilderProvider.cs b/Src/Asp.NetCore2/SqlSugar/Abstract/SqlBuilderProvider/SqlBuilderProvider.cs index f125f9a08..b2bf88cda 100644 --- a/Src/Asp.NetCore2/SqlSugar/Abstract/SqlBuilderProvider/SqlBuilderProvider.cs +++ b/Src/Asp.NetCore2/SqlSugar/Abstract/SqlBuilderProvider/SqlBuilderProvider.cs @@ -139,7 +139,7 @@ namespace SqlSugar mainIndex++; continue; } - else if (item.FieldName == $"[value=sql{UtilConstants.ReplaceKey}]") + else if (item.FieldName == UtilMethods.FiledNameSql()) { builder.Append(item.FieldValue); continue; diff --git a/Src/Asp.NetCore2/SqlSugar/Utilities/UtilMethods.cs b/Src/Asp.NetCore2/SqlSugar/Utilities/UtilMethods.cs index 6e34025aa..203af036a 100644 --- a/Src/Asp.NetCore2/SqlSugar/Utilities/UtilMethods.cs +++ b/Src/Asp.NetCore2/SqlSugar/Utilities/UtilMethods.cs @@ -1054,5 +1054,9 @@ namespace SqlSugar } } + public static string FiledNameSql() + { + return $"[value=sql{UtilConstants.ReplaceKey}]"; + } } }