Home All Groups Group Topic Archive Search About

Making my own classes compatible with TransactionScope

Author
4 Jul 2006 9:50 AM
Steve B.
Hi,

I'm using TransactionScope to make updates in a DB.

Within the same TransactionScope, I execute custom code. How can I make this
code "compatible" with TransactionScope ?

ex:

using(TransactionScope ts = new TransactionScope())
{
myCmd.ExecuteNonQuery();

myCmd2.ExecuteNonQuery();

myCustomObject.ExecuteSomeCodeIWrote();
}

Thanks in advance,
Steve

AddThis Social Bookmark Button