C# - 事物回滚

该功能依赖dbhelp.cs

 

传送门:http://www.cnblogs.com/CyLee/p/5324652.html

 

起始点,不能放在try语句中

this.DbHelp.BeginTransaction();

回滚

this.DbHelp.Rollback();

解除

this.DbHelp.Commit();

 

posted @ 2016-03-27 00:40  贝尔塔猫  阅读(229)  评论(0编辑  收藏  举报