When Method1()
instantiates a TransactionScope
and calls Method2()
that also instantiates a TransactionScope
, how does .NET know both are in the same scope?
I believe it doesn't use static methods internally otherwise it wouldn't work well on multithreaded applications like ASP.NET.
Is it possible to create my own TransactionScope-like class or does the original one use special features those just Microsoft knows how they work?