Beispiel #1
0
        public DataSet ExecutePagedQuery(DatabaseCommand command, int startRecord, int maxRecords, string tableName)
        {
            OnExecuting(new DatabaseCommandExecutingEventArgs(command));

            var result = Execute(() => _connection.ExecuteQuery(command, startRecord, maxRecords, tableName));

            OnExecuted(new DatabaseCommandExecutedEventArgs(command, result.TimeTaken));

            return(result.Value);
        }
Beispiel #2
0
        public IDataReader ExecuteReader(DatabaseCommand command)
        {
            OnExecuting(new DatabaseCommandExecutingEventArgs(command));

            var result = Execute(() => _connection.ExecuteReader(command));

            OnExecuted(new DatabaseCommandExecutedEventArgs(command, result.TimeTaken));

            return(result.Value);
        }
Beispiel #3
0
        public int ExecuteNonQuery(DatabaseCommand command)
        {
            OnExecuting(new DatabaseCommandExecutingEventArgs(command));

            var result = Execute(() => _connection.ExecuteNonQuery(command));

            OnExecuted(new DatabaseCommandExecutedEventArgs(command, result.TimeTaken));

            return(result.Value);
        }
Beispiel #4
0
 public DatabaseCommandExecutedEventArgs(DatabaseCommand command, TimeSpan timeTaken)
 {
     Command   = command;
     TimeTaken = timeTaken;
 }
Beispiel #5
0
 public DatabaseCommandExecutingEventArgs(DatabaseCommand command)
 {
     Command = command;
 }