- 修复 ISelect.AsTable 后 .ToUpdate/ToDelete 无效的 bug;#815

This commit is contained in:
2881099
2021-07-06 00:26:16 +08:00
parent 0aa389c118
commit def3ebdeff
5 changed files with 74 additions and 0 deletions

View File

@ -393,6 +393,8 @@ namespace FreeSql.Internal.CommonProvider
if (_params.Any()) del._params = new List<DbParameter>(_params.ToArray());
if (_whereGlobalFilter.Any()) del._whereGlobalFilter = new List<GlobalFilter.Item>(_whereGlobalFilter.ToArray());
del.WithConnection(_connection).WithTransaction(_transaction).CommandTimeout(_commandTimeout);
var trytbname = "";
del.AsTable(old => GetTableRuleUnions().FirstOrDefault()?.TryGetValue(_tables[0].Table.Type, out trytbname) == true ? trytbname : null);
switch (_orm.Ado.DataType)
{
case DataType.Dameng:
@ -421,6 +423,8 @@ namespace FreeSql.Internal.CommonProvider
if (_params.Any()) upd._params = new List<DbParameter>(_params.ToArray());
if (_whereGlobalFilter.Any()) upd._whereGlobalFilter = new List<GlobalFilter.Item>(_whereGlobalFilter.ToArray());
upd.WithConnection(_connection).WithTransaction(_transaction).CommandTimeout(_commandTimeout);
var trytbname = "";
upd.AsTable(old => GetTableRuleUnions().FirstOrDefault()?.TryGetValue(_tables[0].Table.Type, out trytbname) == true ? trytbname : null);
switch (_orm.Ado.DataType)
{
case DataType.Dameng: