Search code examples
.netormllblgenpro

Does LLBLGen wrap a recursive save in a transaction by default?


When saving an entity with related entities in LLBLGen, will it automatically wrap the DB calls inside a transaction, or could some portion of the save fail while other portions succeed?


Solution

  • Recursive saves are always wrapped in a transaction. Single saves are only wrapped into a transaction if the entity is in a TPE inheritance hierarchy. Otherwise the single INSERT/UPDATE statement isn't wrapped into a transaction as it is already a transaction (atomic unit) on its own.