添加事务、完善注释

This commit is contained in:
橙子
2022-04-13 21:36:50 +08:00
parent 04a3b1b01f
commit d51d31899f
6 changed files with 77 additions and 2 deletions

View File

@@ -24,6 +24,18 @@ namespace Yi.Framework.Repository
_Db = context;
}
/// <summary>
/// 异步事务
/// </summary>
/// <param name="func"></param>
/// <returns></returns>
public async Task<bool> UseTranAsync(Func<Task> func)
{
var res = await Db.AsTenant().UseTranAsync(func);
return res.IsSuccess;
}
/// <summary>
/// 添加返回实体