当我更多地研究它时,这似乎是一个棘手而广泛的问题,有可能成为生产中的头疼,所以我决定不以这种方式处理事务(即使我很喜欢语法,我真的想要它上班).
这些问题是否仍然存在或者使用安全吗?你现在经常使用这个没有问题吗?
非常感谢!
注意:现在已经很久了,但我认为这个问题与Distribute Transaction Coordinator有关.我摆弄了很长时间,但却从来没有能够让它发挥作用.
解决方法
编辑:更具体地回答你的问题,这是Strahl对TransactionScope的评价:
Traditionally TransactionScope was a .NET wrapper around the Distributed Transaction Coordinator (DTC) but it’s functionality has expanded somewhat. One concern is that the DTC is rather expensive in terms of resource usage and it requires that the DTC service is actually running on the machine (yet another service which is especially bothersome on a client installation).
However,recent updates to TransactionScope and the sql Server Client drivers make it possible to use TransactionScope class and the ease of use it provides without requiring DTC as long as you are running against a single database and with a single consistent connection string