private T InnerGetValue <T>(T value)
        {
            IDbTransaction trans = Command.DriverCommand.Transaction;
            IDbConnection  conn  = Command.DriverCommand.Connection;

            try {
                return((T)ExecutionService.TransformDatabaseToRuntimeValue(value));
            } catch (DbException e) {
                ITransactionManager manager = Command is ManagedCommand ? ((ManagedCommand)Command).Manager : null;
                ExecutionService.OnExecuteException(e, Command.DriverCommand, DriverReader, conn, trans, manager);
                throw;
            }
        }
 protected override void EndTransaction(TransactionInfo transInfo, bool commit, bool toFreeResources)
 {
     //Keep the request transaction open if possible
     if (!toFreeResources && RequestTransactionInfo != null && RequestTransactionInfo.Equals(transInfo))
     {
         IDbCommand cmd = ExecutionService.CreateCommand(transInfo.Transaction, commit ? "COMMIT" : "ROLLBACK");
         try {
             ExecutionService.ExecuteNonQuery(cmd);
         } catch (DbException e) {
             ExecutionService.OnExecuteException(e, cmd, null, transInfo.Connection, transInfo.Transaction, this);
             throw;
         }
     }
     else
     {
         base.EndTransaction(transInfo, commit, toFreeResources);
     }
 }
Ejemplo n.º 3
0
 protected virtual void HandleDatabaseException(DbException e, IDataReader reader, IDbConnection conn, IDbTransaction trans)
 {
     ExecutionService.OnExecuteException(e, DriverCommand, reader, conn, trans, null);
 }
 protected override void HandleDatabaseException(DbException e, IDataReader reader, IDbConnection conn, IDbTransaction trans)
 {
     ExecutionService.OnExecuteException(e, DriverCommand, reader, conn, trans, Manager);
 }