Repository navigation
Wolverine + EF Core domain events are not collected/published when using AutoApplyTransactions or manual IUnitOfWork commit #2562
Unanswered
azamat-kholturaev
asked this question in
Q&A
Replies: 1 comment 2 replies
|
Hey man, this is about as non-idiomatic as you could possibly be with Wolverine and not really an architecture I would recommend with Wolverine. Try eliminating as many layers as you can and make your types public so Wolverine can build everything w/o IoC. I'd guess you're getting messed up by having to use service location. Might wanna read over Wolverine's Best Practices and try to conform to that. |
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
🧩 Wolverine + EF Core domain events are not published (AutoApplyTransactions / manual UoW)
Description
I am using Wolverine + EF Core + PostgreSQL + RabbitMQ in a modular monolith.
I am trying to use Wolverine EF Core integration:
However, domain events raised inside my aggregate are not being collected or published.
Additionally:
AutoApplyTransactions()→BookOrderis not saved in DB at allIUnitOfWork→ data may persist, but domain events are not publishedExpected behavior
Actual behavior
AutoApplyTransactions()the entity is not savedArchitecture flow
Aggregate Root
Domain Entity
Domain Event
Repository
Infrastructure registration
Endpoint
Command Handler
Domain → Integration handler
Wolverine configuration
Step-by-step problem
OrderBookCommandis executedBookOrderis createdBookOrderPlacedDomainEventis raisedQuestions
PublishDomainEventsFromEntityFrameworkCorerequire a specific handler pattern?SaveChanges()?Handle(DomainEvent)supported?AutoApplyTransactions()prevent entity persistence?Environment
Notes
SaveChangesAsync()Any help would be appreciated
All reactions