本文介绍了隔离级别继承的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为我的代码定义了一个事务范围。但有一点我不了解事务范围的隔离级别。如果我有一行代码超出事务范围,隔离级别是否会继承到代码行?

以下是我的例子:

Hi, I have a transaction scope defined for my codes. But there is one thing I dont understand about the isolation level for transaction scope. If I have a line of code that is outside of the transaction scope, would the isolation level be inherited into the line of codes?
Below are my example:

using (TransactionScope t = new TransactionScope(TransactionScopeOption.RequiresNew, TransactionUtil.GetTransactionOptions(600)))
{
//do something here
//isolation level is ReadCommitted
}
//new line of codes here





任何帮助将不胜感激。谢谢。



我尝试了什么:



1.研究在线文章解释。



Any help would be appreciated. Thank you.

What I have tried:

1. Researched online for article explanation.

推荐答案


这篇关于隔离级别继承的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-20 19:39