/// <summary> /// Trace before executing reader. /// </summary> /// <param name="command">Instance of <see cref="DbCommand"/>.</param> /// <param name="eventData">Instance of <see cref="CommandEventData"/>.</param> /// <param name="result">Result from <see cref="IInterceptor"/>.</param> /// <returns>Result from <see cref="IInterceptor"/>.</returns> public override InterceptionResult <DbDataReader> ReaderExecuting(DbCommand command, CommandEventData eventData, InterceptionResult <DbDataReader> result) { EFUtil.ProcessBeginCommand(command, _collectSqlQueriesOverride); return(base.ReaderExecuting(command, eventData, result)); }
/// <summary> /// Trace before executing reader asynchronously. /// </summary> /// <param name="command">Instance of <see cref="DbCommand"/>.</param> /// <param name="eventData">Instance of <see cref="CommandEventData"/>.</param> /// <param name="result">Result from <see cref="IInterceptor"/>.</param> /// <param name="cancellationToken">Instance of <see cref="CancellationToken"/>.</param> /// <returns>Task representing the async operation.</returns> public override Task <InterceptionResult <DbDataReader> > ReaderExecutingAsync(DbCommand command, CommandEventData eventData, InterceptionResult <DbDataReader> result, CancellationToken cancellationToken = default) { EFUtil.ProcessBeginCommand(command, _collectSqlQueriesOverride); return(base.ReaderExecutingAsync(command, eventData, result, cancellationToken)); }
private void OnCommandStart(DbCommand command) { EFUtil.ProcessBeginCommand(command, _collectSqlQueriesOverride); }