Browse Source

Update .net framework project

pull/19/head
sunkaixuan 2 years ago
parent
commit
2e986c350d
  1. 2
      Src/Asp.Net/SqlSugar/Abstract/DeleteProvider/DeleteableProvider.cs
  2. 4
      Src/Asp.Net/SqlSugar/Abstract/UpdateProvider/UpdateableProvider.cs

2
Src/Asp.Net/SqlSugar/Abstract/DeleteProvider/DeleteableProvider.cs

@ -568,7 +568,7 @@ namespace SqlSugar
{
List<DiffLogTableInfo> result = new List<DiffLogTableInfo>();
var whereSql = Regex.Replace(sql, ".* WHERE ", "", RegexOptions.Singleline);
var dt = this.Context.Queryable<T>().Where(whereSql).AddParameters(parameters).ToDataTable();
var dt = this.Context.Queryable<T>().Filter(null, true).Where(whereSql).AddParameters(parameters).ToDataTable();
if (dt.Rows != null && dt.Rows.Count > 0)
{
foreach (DataRow row in dt.Rows)

4
Src/Asp.Net/SqlSugar/Abstract/UpdateProvider/UpdateableProvider.cs

@ -876,7 +876,7 @@ namespace SqlSugar
{
whereSql=Regex.Match(sql, @"\(EXISTS.+").Value;
}
dt = this.Context.Queryable<T>().Where(whereSql).AddParameters(parameters).ToDataTable();
dt = this.Context.Queryable<T>().Filter(null, true).Where(whereSql).AddParameters(parameters).ToDataTable();
}
else
{
@ -886,7 +886,7 @@ namespace SqlSugar
}
else
{
dt = this.Context.Queryable<T>().WhereClassByPrimaryKey(this.UpdateObjs.ToList()).ToDataTable();
dt = this.Context.Queryable<T>().Filter(null, true).WhereClassByPrimaryKey(this.UpdateObjs.ToList()).ToDataTable();
}
}
if (dt.Rows != null && dt.Rows.Count > 0)

Loading…
Cancel
Save