10.1.0, Angular
Have a look at Predefined Events.
What exactly is the difference between -ing
and -ed
events and in what scenario would I use them?
Also, see this question I posted a while ago.
I could really need an event that is called before SaveChanges()
and would expect -ing
events to work that way ... but, unfortunately, they don't ... anymore.
So, I wonder what is the difference between -ing
and -ed
events!?
4 Answer(s)
-
1
Hi,
You can refer to https://aspnetboilerplate.com/Pages/Documents/EventBus-Domain-Events.
Here is the statement which explains -ing and -ed events from the documentation.
'ing' events (e.g. EntityUpdating) are triggered before committing a transaction. This way, you can rollback the unit of work and prevent an operation by throwing an exception. 'ed' events (e.g. EntityUpdated) are triggered after committing a transaction, for which you cannot rollback the unit of work.
-
0
Hi @ismcagdas and thank you for your answer!
I guess, if I want to have an event that's triggered before
SaveChanges()
is called, I have to trigger the event manually, right!? -
1
Hi @alexanderpilhar , If it is not a predefined event, you need to manually publish the event.
-
0
Hi @zony!
Yes, I'll stick with triggering my custom event manually, thank you!