Exemplo n.º 1
0
        public override DbDataReader ReaderExecuted(DbCommand command, CommandExecutedEventData eventData, DbDataReader result)
        {
            if (command?.CommandText != null)
            {
                ExecutedReaderCommands.Add(command.CommandText);
            }

            return(base.ReaderExecuted(command, eventData, result));
        }
Exemplo n.º 2
0
        public override ValueTask <DbDataReader> ReaderExecutedAsync(DbCommand command, CommandExecutedEventData eventData, DbDataReader result, CancellationToken cancellationToken = default)
        {
            if (command?.CommandText != null)
            {
                ExecutedReaderCommands.Add(command.CommandText);
            }

            return(base.ReaderExecutedAsync(command, eventData, result, cancellationToken));
        }
Exemplo n.º 3
0
        public override DbDataReader ReaderExecuted(DbCommand command, CommandExecutedEventData eventData, DbDataReader result)
        {
            if (command?.CommandText != null)
            {
                lock (ExecutedReaderCommands)
                {
                    ExecutedReaderCommands.Add(BuildCommandInformation(command));
                }
            }

            return(base.ReaderExecuted(command, eventData, result));
        }