....原来里面有BeginTransaction这个函数....
用用Moon.Orm
开源国产,比这个强大多了
http://www.cnblogs.com/humble/p/3644516.html
try {
SqlMapper.BeginTransaction();
SqlMapper.Update(xxx);
SqlMapper.Insert(xxx);
SqlMapper.CommitTransaction();
}
catch (Exception ex) {
SqlMapper.RollBackTransaction();
throw;
}