- 增加 Async CancellationToken IDelete;

This commit is contained in:
2881099
2020-11-12 06:43:45 +08:00
parent 8bbb7329f9
commit 37cd18d7c4
20 changed files with 51 additions and 48 deletions

View File

@ -3,6 +3,7 @@ using System;
using System.Collections.Generic;
using System.Data;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace FreeSql.SqlServer.Curd
@ -61,7 +62,7 @@ namespace FreeSql.SqlServer.Curd
#if net40
#else
async public override Task<List<T1>> ExecuteDeletedAsync()
async public override Task<List<T1>> ExecuteDeletedAsync(CancellationToken cancellationToken = default)
{
var sql = this.ToSql();
if (string.IsNullOrEmpty(sql)) return new List<T1>();
@ -89,7 +90,7 @@ namespace FreeSql.SqlServer.Curd
Exception exception = null;
try
{
ret = await _orm.Ado.QueryAsync<T1>(_table.TypeLazy ?? _table.Type, _connection, _transaction, CommandType.Text, sql, _commandTimeout, dbParms);
ret = await _orm.Ado.QueryAsync<T1>(_table.TypeLazy ?? _table.Type, _connection, _transaction, CommandType.Text, sql, _commandTimeout, dbParms, cancellationToken);
}
catch (Exception ex)
{