TransactionScope error in ambient transaction does not rollback the transaction
问题 I use an ambient transaction like this : using(TransactionScope tran = new TransactionScope()) { CallAMethod1();//INSERT CallAMethod2();//INSERT tran.Complete(); } The method CallAMethod2(); returns affected rows =-264 So it fails to insert however the first Insert has been committed ! I want to know how to work with ambient transaction and what if the second method has more than one action which needs internal transaction , should i put these actions in internal transaction ? like this : DAL