什么是TransactionScope默认超时值?

Uri*_*son 17 c# sql transactionscope

当我按如下方式创建TransactionScope对象时:

using (TransactionScope ts = new TransactionScope())
{
  // Do stuff...
}
Run Code Online (Sandbox Code Playgroud)

给定ts对象的默认事务超时是多少?

Dav*_*ton 23

根据David Browne的说法,它是1分钟

TransactionScope的默认构造函数将隔离级别默认为Serializable,并将超时默认为1分钟

使用新的TransactionScope()认为有害