SubSonic2.2 SharedDbConnectionScope and TransactionScope Transaction Confusion

这一生的挚爱 提交于 2019-12-05 23:51:04

The SharedConnectionScope (SCS) block must be inside a TransactionScope (TS). The purpose of the SCS is to prevent escalating the transaction to the MSDTC if possible, so having the TS using block inside of a SCS using block makes little sense to me. In any case, every TS block must have a Complete() call for the transaction to be committed.

Personally i found that when using SQL 2005, SCS must be inside TS and when using SQL 2000 (with MSDTC), SCS must wrap TS. I hope this helps...

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!