Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

What's the difference between -ing & -ed events (predefined events) #10035


User avatar
0
alexanderpilhar created

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)
  • User Avatar
    1
    ismcagdas created
    Support Team

    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.

  • User Avatar
    0
    alexanderpilhar created

    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!?

  • User Avatar
    1
    zony created
    Support Team

    Hi @alexanderpilhar , If it is not a predefined event, you need to manually publish the event.

  • User Avatar
    0
    alexanderpilhar created

    Hi @zony!

    Yes, I'll stick with triggering my custom event manually, thank you!