瀏覽代碼

tweak transaction extension method

master
Savorboard 6 年之前
父節點
當前提交
690380a3cc
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. +5
    -0
      src/DotNetCore.CAP.MongoDB/ICapTransaction.MongoDB.cs

+ 5
- 0
src/DotNetCore.CAP.MongoDB/ICapTransaction.MongoDB.cs 查看文件

@@ -45,6 +45,11 @@ namespace DotNetCore.CAP
public static ICapTransaction Begin(this ICapTransaction transaction,
IClientSessionHandle dbTransaction, bool autoCommit = false)
{
if (!dbTransaction.IsInTransaction)
{
dbTransaction.StartTransaction();
}
transaction.DbTransaction = dbTransaction;
transaction.AutoCommit = autoCommit;



Loading…
取消
儲存