kgrzybek / modular-monolith-with-ddd

Full Modular Monolith application with Domain-Driven Design approach.
MIT License
10.89k stars 1.71k forks source link

ContextId of DbContext In Repository、UnitWork、DomainEventsAccessor is diffirent #237

Closed effapp closed 2 years ago

effapp commented 2 years ago

Hi: Happy new year!

  I found that ContextId of DbContext In Repository、UnitWork、DomainEventsAccessor is diffirent.

CommitAsync() of UnitOfWork can't save entity data and GetAllDomainEvents() of DomainEventsAccessor is empty forever,

How to find out it and solve it ?

effapp commented 2 years ago

autofac register DbContext's lifetime is error , issue is solved.