Worthy7
Worthy7

Reputation: 1561

Manually trigger an "after UoW" event

In the documentation it says that "EntitySavedEventData" will be automatically triggered after the UoW has completed. I want to make a custom event, which only happens after the changes have been saved to the database. I want to manually trigger the event only in some specific cases. How do I do this?

Upvotes: 0

Views: 148

Answers (1)

aaron
aaron

Reputation: 43098

You can trigger after changes have been saved by adding an event handler like how ABP does it:

_unitOfWorkManager.Current.Completed += (sender, args) =>
{
    // Manually trigger the event only in some specific cases
};

Upvotes: 3

Related Questions