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.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment