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(); } }