As you may know, Suppress scope will suppress the current ambient transaction, and if there is no ambient transaction present, it will not create any transaction at all.
But there is one thing you may not know, which is, if there is another TransactionScope further down the stack it will react as if there was no ambient transaction (and create one if necessary).
So if you have 3 scopes as follows: .Required -> .Suppress -> .Required: Then 2 transactions will be created. The innermost TransactionScope with .Required will see that there is no ambient transaction and will creates one for itself.
One thing to remember, to keep the code consistence, always call scope.Complete() at the end of your suppress TransactionScope even you know logically there will be no transaction created. There will be no any overhead caused by doing that.
Wednesday, 24 February 2010
Friday, 19 February 2010
101 LINQ Samples
No extra words, see the link below from Microsoft which covered all the knowledge you need to create any complicated Linq to SQL query.
http://msdn.microsoft.com/en-us/vcsharp/aa336746.aspx
http://msdn.microsoft.com/en-us/vcsharp/aa336746.aspx
Diagrams of determining the dimensions of elements
Subscribe to:
Comments (Atom)


.jpg)
.jpg)
.jpg)