This is a migrated thread and some comments may be shown as answers.

Transaction Handling in new API

1 Answer 45 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Norbert
Top achievements
Rank 2
Norbert asked on 28 Sep 2011, 02:49 PM
Hello,

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
Norbert

1 Answer, 1 is accepted

Sort by
0
Nikola
Telerik team
answered on 28 Sep 2011, 04:17 PM
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,

Nikola
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 >>

Tags
General Discussions
Asked by
Norbert
Top achievements
Rank 2
Answers by
Nikola
Telerik team
Share this question
or