Beispiel #1
0
 public object ExecuteScalar(ICommand command)
 {
     if (command == null)
     {
         throw new ArgumentNullException("command");
     }
     if (command.Transaction == null)
     {
         using (ITransaction transaction = TransactionFactory.GetTransaction(this, false)) {
             command.Transaction = transaction;
             return(command.DbCommand.ExecuteScalar());
         }
     }
     return(command.DbCommand.ExecuteScalar());
 }
Beispiel #2
0
        public DataSet GetDataSet(ICommand command, DataSet dataSet, string[] tables)
        {
            if (command == null)
            {
                throw new ArgumentNullException("command");
            }

            if (command.Transaction == null)
            {
                using (ITransaction transaction = TransactionFactory.GetTransaction(this, false)) {
                    command.Transaction = transaction;
                    return(GetDataSetInternal(command, dataSet, tables));
                }
            }
            return(GetDataSetInternal(command, dataSet, tables));
        }
Beispiel #3
0
 public object ExecuteScalar(string spName)
 {
     using (ITransaction transaction = TransactionFactory.GetTransaction(this, false)) {
         return(this.ExecuteScalar(spName, transaction));
     }
 }
Beispiel #4
0
 public object ExecuteScalar(string spName, params IDataParameter[] parameters)
 {
     using (ITransaction transaction = TransactionFactory.GetTransaction(this, false)) {
         return(this.ExecuteScalar(spName, transaction, parameters));
     }
 }
Beispiel #5
0
 public object ExecuteScalar(string command, CommandType commandType, params IDataParameter[] parameters)
 {
     using (ITransaction transaction = TransactionFactory.GetTransaction(this, false)) {
         return(ExecuteScalar(command, commandType, transaction, parameters));
     }
 }
Beispiel #6
0
 public object ExecuteScalar(string command, CommandType commandType)
 {
     using (ITransaction transaction = TransactionFactory.GetTransaction(this, false)) {
         return(ExecuteScalar(command, commandType, transaction));
     }
 }
Beispiel #7
0
 public int ExecuteNonQuery(string spName)
 {
     using (ITransaction transaction = TransactionFactory.GetTransaction(this, false)) {
         return(this.ExecuteNonQuery(spName, transaction));
     }
 }
Beispiel #8
0
 public int ExecuteNonQuery(string spName, params IDataParameter[] parameters)
 {
     using (ITransaction transaction = TransactionFactory.GetTransaction(this, false)) {
         return(this.ExecuteNonQuery(spName, transaction, parameters));
     }
 }
Beispiel #9
0
 public int ExecuteNonQuery(string command, CommandType commandType)
 {
     using (ITransaction transaction = TransactionFactory.GetTransaction(this, false)) {
         return(ExecuteNonQuery(command, commandType, transaction));
     }
 }
Beispiel #10
0
 public DataSet ExecuteDataSet(string spName)
 {
     using (ITransaction transaction = TransactionFactory.GetTransaction(this, false)) {
         return(this.ExecuteDataSet(spName, transaction));
     }
 }
Beispiel #11
0
 public DataSet ExecuteDataSet(string command, CommandType commandType)
 {
     using (ITransaction transaction = TransactionFactory.GetTransaction(this, false)) {
         return(ExecuteDataSet(command, commandType, transaction));
     }
 }
Beispiel #12
0
 public int UpdateDataSet(DataSet dataSet, ICommand insertCommand, ICommand updateCommand, ICommand deleteCommand, string tableName)
 {
     using (ITransaction transaction = TransactionFactory.GetTransaction(this, false)) {
         return(UpdateDataSet(dataSet, insertCommand, updateCommand, deleteCommand, tableName, transaction));
     }
 }