public override DbDataReader ReaderExecuted(DbCommand command, CommandExecutedEventData eventData, DbDataReader result) { if (command?.CommandText != null) { ExecutedReaderCommands.Add(command.CommandText); } return(base.ReaderExecuted(command, eventData, result)); }
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)); }
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)); }