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