【发布时间】:2010-05-31 09:27:50
【问题描述】:
我可以这样做吗:
using (var scope = new TransactionScope())
{
using (var conn = new SqlConnection(Cs))
{
using (var cmd = conn.CreateCommand())
{
cmd.CommandType = CommandType.StoredProcedure;
...
scope.complete();
}
}
}
将与使用 catch(){rollback;} 的 SqlTransaction 相同
【问题讨论】:
标签: c# sql transactionscope