c# lock TransactionScope

 

 TransactionOptions option = new TransactionOptions();
                            //option.IsolationLevel = System.Transactions.IsolationLevel.Serializable;//默认;可以在事务期间读取可变数据,但是不可以修改,也不可以添加任何新数据。   
                            option.IsolationLevel = System.Transactions.IsolationLevel.RepeatableRead;//可读可写 不可改模式
                            //option.IsolationLevel = System.Transactions.IsolationLevel.ReadUncommitted;//可读可写可改模式
                            //分步执行的需要使用事务保证完整 性
                            using (var scope = new TransactionScope(TransactionScopeOption.Required, option))
                            {

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-23
  • 2021-10-25
  • 2022-12-23
  • 2021-09-25
  • 2021-09-27
猜你喜欢
  • 2022-12-23
  • 2021-08-06
  • 2021-11-22
相关资源
相似解决方案