Browse Source

Update db.DeleteNav

SqlSugar5
sunkaixuan 2 years ago
parent
commit
a49f6f2d74
  1. 2
      Src/Asp.Net/SqlSugar/Abstract/ExecuteNavProvider/DeleteNavManyToMany.cs

2
Src/Asp.Net/SqlSugar/Abstract/ExecuteNavProvider/DeleteNavManyToMany.cs

@ -34,7 +34,7 @@ namespace SqlSugar
} }
var aids = _ParentList.Select(it => parentPkColumn.PropertyInfo.GetValue(it)).ToList(); var aids = _ParentList.Select(it => parentPkColumn.PropertyInfo.GetValue(it)).ToList();
var bids = _Context.Queryable<object>().AS(mappingEntity.DbTableName).In(mappingA.DbColumnName, aids) var bids = _Context.Queryable<object>().Filter(mappingEntity.Type).AS(mappingEntity.DbTableName).In(mappingA.DbColumnName, aids)
.Select(mappingB.DbColumnName).ToDataTable() .Select(mappingB.DbColumnName).ToDataTable()
.Rows.Cast<System.Data.DataRow>().Select(it => it[0]).ToList(); .Rows.Cast<System.Data.DataRow>().Select(it => it[0]).ToList();

Loading…
Cancel
Save