Understanding TransactionScopeOptions: RequiresNew = Suppress + Required?

Viewed 37223

I believe I understand TransactionScopeOption.Suppress and TransactionScopeOption.Required but am having difficulty understanding what TransactionScopeOption.RequiresNew does. Based on the last explanation that I read, would the following two blocks of code functionally be the same? Is this an accurate representation of what RequiresNew means?

using (var ts1 = new TransactionScope(TransactionScopeOption.RequiresNew))
{
  DoStuff();
  ts1.Complete();
}

and

using (var ts2 = new TransactionScope(TransactionScopeOptions.Suppress))
{
  using (var ts3 = new TransactionScope())
  {
    DoStuff();
    ts3.Complete();
  }

  ts2.Complete(); // not required but recommended for consistency's sake
}
1 Answers
Related