LINQ

  • Thread starter Thread starter Mike Gleason jr Couturier
  • Start date Start date
M

Mike Gleason jr Couturier

Hi,

How can I apply business login _after_ objects has been successfully
committed to the database using SubmitChanges()?

Ex.: OnCreated is raised after the entity has been created but before (if
any) a commit succeeded...

If the SubmitChanges fails, the business logic must not be applyed...

Do I have to implement this mechanism myself?

Thanks
 
I have several scenarios where I want to take action after a successful
commit: one of them is to send a confirmation email..

I use an approach with DDD and the client can act "freely" on repositories
(add 2-3 users, remove 1) then submit changes on that repository.

That's a single example but what if I have 2-3 different Observers on
different entities when SubmitChanges is called.... I guess I have to
implement my own "event" and keep them in a list..

Thanks for you suggestion thought, I'll have a look

Mike
 
Back
Top