public void Delete(List<int> batch) { using (Connection conn = new Connection()) { conn.BeginTransaction(); try { Delete(batch, conn); } catch(Exception e) { conn.RollbackTransaction(); throw e; } conn.CommitTransaction(); } }
public void Update(List<GiftListGroupEntity> batch) { using (Connection conn = new Connection()) { conn.BeginTransaction(); try { } catch (Exception e) { conn.RollbackTransaction(); throw e; } conn.CommitTransaction(); } }
public void Insert(List<GiftListGroupEntity> batch) { using (Connection conn = new Connection()) { conn.BeginTransaction(); try { batch.ForEach(x => Insert(x, conn)); } catch(Exception e) { conn.RollbackTransaction(); throw e; } conn.CommitTransaction(); } }