Mid*_*one 1 msdtc transactions transactionscope system.transactions
交易范围如何运作?它是如何知道何时已经使用了另一个上下文,以及如何在我的代码中实现另一种范围.
我主要是一个vb.net开发人员,但如果你写的话,我可以阅读c#.
如果上述情况过于模糊:
我理解system.transactions的作用以及如何使用它.我想知道的是如何创建类似的东西,我自己的库,我可以包装一些代码,可以像system.transactions范围一样处理它.我打算在缓存模型中使用它,它会大大增强它.我正在寻找有关事务范围如何知道的详细信息,例如存在父范围,因此它可以附加到它等等,或者提交然后需要在更高级别或更高级别的联系中进行.
例如,如果我有以下内容
using scope1 as new system.transactions.scope
using scope2 as new system.transactions.scope
using scope3 as new system.transactions.scope
scope3.commit
end using
scope2.commit
end using
end using
Run Code Online (Sandbox Code Playgroud)
Scope1不会提交,因此scope2或scope3也不会提交,因为它们的父级都是scope1的上下文.我希望能够用我自己的库来设置它.
归档时间: |
|
查看次数: |
1585 次 |
最近记录: |