DEV Community

Cover image for Smooth Transactions with TransactionScope

Smooth Transactions with TransactionScope

Rion Williams on April 22, 2019

This was originally posted on my blog. In the real world, we deal with transactions all the time, even though we rarely think of them as such. Thi...
Collapse
 
joaomarcusc profile image
João

IMHO one should always be careful with transactions that involve multiple resources. They may not scale so well and lead to synchronization/blocking issues. If the scope grows too big, it's better to split it across small scopes and allow intermediate states in your application.

Collapse
 
rionmonster profile image
Rion Williams

Hi João,

You are spot on here.

I have another post that’s in the pipeline that specifically talks about some of the issues, caveats, and just things anyone should be cognizant of before trying to handle these type of things (or if they should at all). Thanks again for bringing this up, it’s an important one.

Collapse
 
guibhz profile image
guibhz

One of the best posts about TransactionScope that I ever seen.
Very well explained, fast reading and with some code example.

Congratulations

Collapse
 
kyleljohnson profile image
Kyle Johnson

First let me say I love TransactionScope. But keep in mind database stuff should be done in the database.