diff --git a/Src/Asp.NetCore2/SqlSugar/Infrastructure/ContextMethods.cs b/Src/Asp.NetCore2/SqlSugar/Infrastructure/ContextMethods.cs index b8f6ecb95..12bd4917a 100644 --- a/Src/Asp.NetCore2/SqlSugar/Infrastructure/ContextMethods.cs +++ b/Src/Asp.NetCore2/SqlSugar/Infrastructure/ContextMethods.cs @@ -1264,5 +1264,11 @@ namespace SqlSugar } #endregion + #region Other + public string EscapeLikeValue(string value, char wildcard = '%') + { + return UtilMethods.EscapeLikeValue(this.Context, value, wildcard); + } + #endregion } } diff --git a/Src/Asp.NetCore2/SqlSugar/Interface/IContextMethods.cs b/Src/Asp.NetCore2/SqlSugar/Interface/IContextMethods.cs index 1040b16bb..cdb0269fb 100644 --- a/Src/Asp.NetCore2/SqlSugar/Interface/IContextMethods.cs +++ b/Src/Asp.NetCore2/SqlSugar/Interface/IContextMethods.cs @@ -51,5 +51,6 @@ namespace SqlSugar DataTable DictionaryListToDataTable(List> dictionaryList); List ToTree(List list, Expression>> childListExpression, Expression> parentIdExpression, Expression> pkExpression, object rootValue); KeyValuePair ConditionalModelsToSql(List conditionalModels, int beginIndex = 0); + string EscapeLikeValue(string value, char wildcard = '%'); } }