mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-18 20:08:15 +08:00
- 增加 FreeSql.DbContext/Repository Async CancellationToken 参数;#537
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user