Transaction Handling in new API

Thread is closed for posting
2 posts, 0 answers
  1. Norbert
    Norbert avatar
    35 posts
    Member since:
    Dec 2009

    Posted 28 Sep 2011 Link to this post


    I love OA but there is one question I can't get any answer.
    How are transactions handled within the SaveChanges() method? Are all write operations done within one transaction or are they separated?

    The question is because Sqlite is really slow when you use separated transactions for each record. So it is recommended to do inserts or updates within a bulk transaction.

    Of course I could do it with the wonderful and great AdoApi but...

    Thanks in advance
  2. Nikola
    Nikola avatar
    27 posts

    Posted 28 Sep 2011 Link to this post

    Hello Norbert,

    Simply put, the answer to your question is yes - all changes accumulated by the context are persisted to the database in one transaction when the SaveChanges() method is invoked. This of course includes deleted, inserted and modified entities as well.

    Do not hesitate to contact us if you need more information.

    Best wishes,

    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's SQL Server Community Awards. We are competing in TWO categories and every vote counts! VOTE for Telerik NOW >>

Back to Top