I'm current writing a credit card applicatoin that will need multiple card inserts, updates and removes for my company entity. I'm while using TransactionScope class to ensure all of the saved methods can commit or roll back like a single unit of labor.

My real question is, I'm needed also to use COMMIT TRAN and ROLLBACK TRAN is all of my saved methods should i be while using TransactionScope class during my .Internet class library?

No, you do not need explicit transactions if using TransactionScope for the transactions - however: important you need to most likely set Transaction Binding=Explicit Unbind; within the connection string. The entire particulars are here, but or else you can finish track of the very first couple of procedures getting folded back, and also the last couple of carrying out (in other words, running outdoors associated with a transaction).

ON 2005 no need, on 2000 I'd ,Also, it's my job to place the transactionscope inside a "using" block.

You will find some performance issues when utilizing it on 2000 and older versus 2005.

See here


You should not have to - it ought to be handled inside the TransactionScope. It will depend a bit regarding exactly your work and just how you're handling transaction (explicit or implicit) More HERE

If you're enlisted inside a TransactionScope or CommittableTransaction i quickly would highly recommend that you simply do NOT clearly make your own local transactions using begin transaction or SqlConnection.BeginTransaction.

TransactionScope/CommittableTransaction really are a different 'family' and therefore are mutually exclusive from begin transaction/SqlTransaction

Well, I would disagree with Saif Khan. So System.Transactions has performance issues on Sql 2000, so it may be easier to use SqlTransaction or begin transaction rather. However, should you choose that don't also employ a TransactionScope/CommittableTransaction.

Incidentally, the behavior that Marc Gravell referred to continues to be transformed insInternet 4.. Even when you do not use Explicit Unbind, it's no more easy to possess some instructions folded back plus some committed. (However he's factual that in older versions you need to use Explicit Unbind).