Example #1
0
 internal long DoSave(WLTableDto dto)
 {
     try
     {
         new WLTableDb(ConnectionFactory.MainMySql).Save(dto);
         return(dto.Id);
     }
     catch (StoreProcException ex)
     {
         throw BusinessExceptionFactory.CreateNew(ex);
     }
 }
Example #2
0
 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();
     }
 }
Example #3
0
 public long Save(WLTableDto dto)
 {
     return(DoSave(dto));
 }