Disable transaction wrapping when making stored procedure calls

2 posts, 0 answers
  1. Chirag
    Chirag avatar
    1 posts
    Member since:
    Sep 2015

    Posted 01 Oct 2015 Link to this post


    I noticed that whenever I make stored procedure calls to the database (sql sever), DataAccess wraps the session in a transaction (begin transaction), is there a way to disable it from automatically using a transaction?

    I have Isolationlevel set to readuncommitted in the backend configuration.

    ReadWithoutTransaction doesn't seem to be doing anything



  2. Pavel Uzunov
    Pavel Uzunov avatar
    14 posts

    Posted 06 Oct 2015 Link to this post

    Hello Chirag,
    Telerik Data Access wraps the store procedures calls in a transaction automatically, this is done in that way as it actually enlists the the SP call in the transaction that would content some other CUD operations. If something fails if will rollback even the SP. If you need to invoke only the SP you should commit/rollback the transaction immediately after the Domain Method call with SaveChanges or ClearChanges.

    There are several methods exposed by the OpenAccessContext that could be useful for handling transactions (look at this article). 

    The ReadWithoutTransaction works only for the LINQ queries and it is turned on by default.

     So, I can recommended you to handling transactions as you want or to use a LINQ query if it is acceptable for you. I could be more helpful if you can give us more information about your actual scenario.

    I hope this information helps.

    Pavel Uzunov
    Check out the latest announcement about Telerik Data Access vNext as a powerful framework able to solve core development problems.
  3. DevCraft banner
Back to Top