Update exp to sql

This commit is contained in:
sunkaixuna
2021-09-10 17:59:47 +08:00
parent b449a446f8
commit 0046f6c3c9
4 changed files with 23 additions and 2 deletions

View File

@@ -55,7 +55,7 @@ namespace SqlSugar
}
if (Regex.IsMatch(result, regex))
{
result = "WHERE " + this.Context.Parameters.First(it => it.ParameterName == Regex.Match(result, regex).Groups[1].Value).Value;
result = "WHERE " + GetValue(result, regex);
return result;
}
@@ -64,5 +64,10 @@ namespace SqlSugar
result = result.Replace(selfParameterName, SubTools.GetSubReplace(this.Context));
return result;
}
private object GetValue(string result, string regex)
{
return this.Context.Parameters.First(it => it.ParameterName == Regex.Match(result, regex).Groups[1].Value).Value;
}
}
}