0

which is the best method in transactional system? using TransactionScope in Business Layer or inside Database?

I am using SQL Server 2008 and C3 with Framework 4.0

Inside Business Layer like:

 using (TransactionScope scope = new TransactionScope())
 {
    ...
    scope.Complete();
 }

Or inside Database like:

Begin tran InsertTrace
Begin try
...
End try
Begin Catch
    Rollback tran InsertTrace
    ...
End Catch
Cœur
  • 34,719
  • 24
  • 185
  • 251
David
  • 6,388
  • 9
  • 30
  • 50
  • A possible duplicate of http://stackoverflow.com/questions/22382892/database-begintransaction-vs-transactions-transactionscope – samar May 27 '14 at 10:12
  • your example use Database.BeginTransaction() inside cose i think, I am asking inside database as T-SQL or in bussiness layer – David May 27 '14 at 10:14
  • 1
    This might help but not sure. http://stackoverflow.com/questions/2701934/transactionscope-and-transactions – samar May 27 '14 at 10:19
  • good, yes it is what i needed, thanks – David May 27 '14 at 10:24

0 Answers0