Ejemplo n.º 1
0
        bool IDataReader.Read()
        {
            var read = _dataReader.Read();

            if (read)
            {
                _rowCount++;
            }
            else if (_afterRead != null)
            {
                var eventArgs = new AfterReadEventArgs(_rowCount);
                _afterRead(this, eventArgs);
            }

            return(read);
        }
Ejemplo n.º 2
0
        private void ConnectionAfterRead(object sender, AfterReadEventArgs e)
        {
            var duration = e.Timestamp - _beforeExecuteReader.Timestamp;

            Log.Trace("{0} row(s) read in {1} seconds.", e.RowCount, StopwatchTimeSpan.ToString(duration, 3));
        }