I have a code like this:
using (TransactionScope transactionScope = new TransactionScope()) { SetDefaults(products);
What I intend is that if an error occurs in the methods called in the transaction area, the transaction is rolled back, but after some testing it seems that this is not the case, and my data ends up half-baked. Is there something I'm missing? Do I need to exchange data access calls in the methods themselves in my own TransactionScopes in order to make this work?
source share