【发布时间】:2011-09-11 00:37:51
【问题描述】:
谁能告诉我在使用 Enterprise Library 的 DAAB(4.1 版)时管理事务的首选方式是什么?我在想
Database NewDb = DatabaseFactory.CreateDatabase();
DBCommand NewCmd = NewDb.GetStoredProcCommand("SProcName");
/* Add parameters here. */
using (TransactionScope NewTrans = new TransactionScope())
{
NewDb.ExecuteNonQuery(NewCmd);
NewTrans.Complete()
}
但我不知道我是否会这样做。
【问题讨论】:
标签: transactions enterprise-library daab