|
|
@@ -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; |
|
|
|
|
|
|
|