Hi all,
I was looking through your documentation for unit of work and I came across this:
Can you folks elaborate on a scenario where I would want to use this?
We are using your approach outlined here:
Entity Framework Core integration with SQL Persistence • Sql Persistence Samples • Particular Docs?
to enroll our EF Context in a transaction and support transactionality and unit of work for database operations. My understanding is that all outgoing messages inside a single handler are automatically enrolled in the same transaction and, while I am now questioning myself, I’m 99% sure I have seen and tested that exact situation…
So I’m not clear on what problem the code below is meant to solve?
var unitOfWork = endpointConfiguration.UnitOfWork();
unitOfWork.WrapHandlersInATransactionScope();
I have also seen and tested that multiple event handlers in the same service would all be enrolled in a single transaction.
Can you assit us with a more detailed explanation of the use case for this?