transactionscope

transactionscopetransactionscope
  1. Now imagine that TransactionScope used a similar technique .

    现在,假设TransactionScope使用了相似的技术。

  2. Another use for thread-static fields , and one that brings us back to TransactionScope , is for passing out-of-band data between method calls .

    线程静态字段的另外一种用法是(这又将我们带回到TransactionScope)用于在方法调用之间传递带外数据。

  3. This can be desirable if you think SQL2005 is promoting transactions too often , but the preferred method is TransactionScope .

    如果您觉得SQL2005提升事务级别过于频繁,不妨试试这个做法。不过,最佳选择则是使用TransactionScope。

  4. In reality , the mechanism used by TransactionScope and SqlCommand is more complicated , but at its core the premise is sound .

    实际上,TransactionScope和SqlCommand所使用的机制非常复杂,但核心是前提要合理。

  5. You can imagine that TransactionScope could be using static fields to store the current Transaction and that SqlCommand could just be picking up that Transaction from that static field .

    您可以假设TransactionScope可以使用静态字段来存储当前的Transaction,而SqlCommand只从该静态字段中获取相应Transaction。