SqlConnection conn = new SqlConnection(connString); conn.Open(); SqlTransaction trans = conn.BeginTransaction(); try { //插入操作 conn.Execute(@"insert into News(ID,Sys_NavigationID,NewsId,Title,Author,Summary,...) values(@ID,@Sys_NavigationID,@NewsId,@Title,@Author,...)", list, transaction: trans); trans.Commit(); }catch(Exception e) { trans.Rollback(); } conn.Close();