- 增加 FreeSql.DbContext/Repository Async CancellationToken 参数;#537

This commit is contained in:
2881099
2020-11-17 19:44:47 +08:00
parent c04a32659d
commit 2947572f05
8 changed files with 122 additions and 137 deletions

View File

@ -1,6 +1,7 @@
using System;
using System.Collections.Concurrent;
using System.Reflection;
using System.Threading;
using System.Threading.Tasks;
namespace FreeSql
@ -81,9 +82,9 @@ namespace FreeSql
}
#if net40
#else
async public override Task<int> SaveChangesAsync()
async public override Task<int> SaveChangesAsync(CancellationToken cancellationToken = default)
{
await FlushCommandAsync();
await FlushCommandAsync(cancellationToken);
return SaveChangesSuccess();
}
#endif