I am using the below code to apply the transaction scope
TransactionOptions transOption = new TransactionOptions();
transOption.IsolationLevel = System.Transactions.IsolationLevel.ReadUncommitted;
using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Required, transOption))
{
//Code to delete
//Code to insert
scope.Complete();
}
the scope is not working where if I have an error in the insert the record is deleted not rolled back
you need to tell us which database server you are using. and if you are getting any exception messages or not
anyway the code seems correct, did you check the (MSDTC)? check if it’s enabled on your OS.