Browse Source

Update exp to sql

pull/33/head
sunkaixuan 1 year ago
parent
commit
5b46feb5aa
  1. 6
      Src/Asp.Net/SqlSugar/ExpressionsToSql/DbMethods/DefaultDbMethod.cs

6
Src/Asp.Net/SqlSugar/ExpressionsToSql/DbMethods/DefaultDbMethod.cs

@ -901,9 +901,13 @@ namespace SqlSugar
}
}
//Regex regex = new Regex("\@");
if (sql.EndsWith(" =)"))
if (!sql.Contains("@"))
{
sql = sql.Replace(" =)", $" = {newValue})");
if (!sql.Contains(newValue))
{
sql = sql.Replace(" )", $" = {newValue})");
}
}
else
{

Loading…
Cancel
Save