Why UnitOfWorkManager.Current in Domin Event Handlers is null?
See original GitHub issueHi,
I get UnitOfWorkManager.Current
in my domain event handler and always it is null !!
I need doing some transactional action in my event handler. I set also UnitOfWork
attribute on my handler.
what is the solution for my problem?
[UnitOfWork]
public void HandleEvent(EntityCreatedEventData<CustomerProfileChangeRequest> eventData)
{
// UnitOfWorkManager.Current is null here
}
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
unitOfManager.Current alwasy null in EventHandler #2626
In ModuleB, I have created an event handler for AbpTenantBase Created, and in somewhere of ModuleA, I add a new AbpTenant record. This...
Read more >Unit Of Work | Documentation Center | ABP.IO
Current Unit Of Work can be null if there is no surrounding unit of work. It won't be null if your class is...
Read more >.net core - Object reference null problem while using ...
1 Answer. You need to Begin a unit of work before SetTenantID on the (current) unit of work.
Read more >EventHandler is Null When running MVVM
When the SelectedUniverse is changed, it sends that variable to the ViewModelController , which should invoke the UniverseChanged event. However ...
Read more >Conventional Unit Of Work Methods
Note that if the current unit of work is transactional, all changes in the transaction are rolled back if an exception occurs. Even...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@mehdihadeli make HandleEvent virtual.
thanks