且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

什么时候应该在查询中使用事务?

更新时间:2023-02-16 22:46:09

基本上任何时候您的工作单元要么对外部更改敏感,要么需要能够回滚每个更改,如果发生错误或其他原因.

Basically any time you have a unit of work that is either sensitive to outside changes or needs the ability to rollback every change, if an error occurs or some other reason.

在这里寻找一些出色的答案及其使用原因.