Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Rafal 1 post 71 karma points
    Apr 23, 2021 @ 12:55
    Rafal
    0

    Database transactions management

    Hi,

    I have a question regarding transaction management.

    I've subscribed to ContentSavingEvent (ContentService.Saving) so in my event handler I want to insert a new record to custom db table in the same transaction that Content record is persisted. Currently I've tried to use AmbientScope but object to custom table has been inserted even in case Content has not been persisted to DB because another EventHandler that handles ContentSavingEvent has Canceled this event by setting ContentSavingEventArgs.Cancel = true;

    How to deal with such cases? Is it possible in Umbraco at all?

Please Sign in or register to post replies

Write your reply to:

Draft