Do we need to wrap calls with RunInTransaction?

Issue #16 closed
Devin Rose created an issue

Hi,

I've been using the extensions and appreciating it very much. Question: do I need to wrap calls to the functions (e.g. GetWithChildren) with a RunInTransaction(() => ... ) call?

Comments (4)

  1. Guillermo Gutiérrez

    Transactions are only useful for perform batch write operations, so if any of the write operation fails, none of them is applied. For example, SQLite.Net InsertAll method wraps all Insert calls into a transaction, so if any of them fails, no object is inserted. It could make sense wrapping recursive inserts in a transaction, but on the other side, transactions have no effect on read operations.

    Kind regards.

  2. Log in to comment