[Bug] The HasOpenTransaction property in MySqlEntityFrameworkConnectionProvider always returns false
Describe the bug
The HasOpenTransaction property in MySqlEntityFrameworkConnectionProvider always returns false, preventing changes to the outbox and entity store from being written in the same transaction.
The solution would be to override HasTransaction property as it's done in PostgreSqlEntityFrameworkConnectionProvider
public override bool HasOpenTransaction { get => _context.Database.CurrentTransaction != null; }
To Reproduce
- Setup the outbox using MySqlEntityFrameworkConnectionProvider as TransactionProvider
- Begin a transaction in EF Core
- Call DepositPostAsync method, passing a provider
Actual result: Message won't be written to the outbox within the scope of the transaction
Further technical details
- Brighter version: 1.0.0-preview.3
- The OS: Windows
Thanks, V10 will have bugs right now, so I would remind caution on production usage as opposed to V9. But it is VERY helpful that you are finding bugs in the preview. So please keep reporting them.