From bf389e5b5815df74fa7e0c8d0f31ca4591ba5a9c Mon Sep 17 00:00:00 2001 From: 丁松杰 <377973147@qq.com> Date: Fri, 14 Feb 2020 08:49:58 +0800 Subject: [PATCH] 删除不必要的代码 --- src/Pole.Core/EventBus/Bus.cs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Pole.Core/EventBus/Bus.cs b/src/Pole.Core/EventBus/Bus.cs index efc8059..eec7e70 100644 --- a/src/Pole.Core/EventBus/Bus.cs +++ b/src/Pole.Core/EventBus/Bus.cs @@ -57,13 +57,11 @@ namespace Pole.Core.EventBus } else { - var transaction = (IDbTransactionAdapter)Transaction; + var mediumMessage = eventStorage.StoreMessage(eventEntity, Transaction.DbTransaction); - var mediumMessage = eventStorage.StoreMessage(eventEntity, transaction.DbTransaction); - - if (transaction.AutoCommit) + if (Transaction.AutoCommit) { - await transaction.CommitAsync(); + await Transaction.CommitAsync(); } } -- libgit2 0.25.0