internal long DoSave(WLTableDto dto) { try { new WLTableDb(ConnectionFactory.MainMySql).Save(dto); return(dto.Id); } catch (StoreProcException ex) { throw BusinessExceptionFactory.CreateNew(ex); } }
public void DoubleSave(WLTableDto dto1, WLTableDto dto2) { //TransactionOptions options = new TransactionOptions(); //options.IsolationLevel = (System.Transactions.IsolationLevel) IsolationLevel.ReadCommitted; using (TransactionScope scope = new TransactionScope(TransactionScopeOption.RequiresNew)) { DoSave(dto1); //throw new Exception("Error"); DoSave(dto2); scope.Complete(); } }
public long Save(WLTableDto dto) { return(DoSave(dto)); }