using (TransactionScope ts = new TransactionScope(TransactionScopeOption.Required, new TimeSpan(2, 0, 0)))
{
//your insert/delete/update here.
ts.Complete();
}
Note: If any operation fails then it will rollback automatically.
Wednesday, December 14, 2011
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment