Local Transaction
The Devprime platform offers an integrated feature to enable local transactions with databases and can be used in conjunction with SqlServer, MongoDB, MySQL, PostgreSQL, Oracle.
By enabling this functionality, operations on the database are isolated in an automatic transactional context, and only in case of success is the transaction committed.
The transactional context can be initialized at the business scope within the domain by adding the “ExecuteTransaction” in the Devprime pipeline or directly at the scope of the database repository with the command “ExecuteTransaction” or “ExecuteTransactionResult” as per the desired scenario in the operation.
-
Including the transactional context in the “Aggregate Root” domain
-
Including the transactional context in the “Database” repository