mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-24 18:04:52 +08:00
update GetDiffTable
This commit is contained in:
parent
6307552929
commit
1c27b1ab1c
@ -68,6 +68,9 @@ namespace OrmTest
|
||||
|
||||
|
||||
db.Updateable<Order>().SetColumns(it=>it.Name=="asdfa").Where(it=>it.Id==1).EnableDiffLogEvent("--update Order--").ExecuteCommand();
|
||||
|
||||
db.Updateable<Order>().SetColumns(it => it.Name == "asdfa")
|
||||
.Where(it =>SqlFunc.Subqueryable<Order>().Where(x=>x.Id==it.Id).Any()).EnableDiffLogEvent("--update Order--").ExecuteCommand();
|
||||
Console.WriteLine("#### Aop End ####");
|
||||
}
|
||||
}
|
||||
|
@ -840,6 +840,10 @@ namespace SqlSugar
|
||||
if (this.UpdateParameterIsNull)
|
||||
{
|
||||
var whereSql = Regex.Replace(sql, ".* WHERE ", "", RegexOptions.Singleline);
|
||||
if (sql.Contains("WHERE (EXISTS"))
|
||||
{
|
||||
whereSql=Regex.Match(sql, @"\(EXISTS.+").Value;
|
||||
}
|
||||
dt = this.Context.Queryable<T>().Where(whereSql).AddParameters(parameters).ToDataTable();
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user