private void OnCommandStop(Exception exception) { if (exception != null) { EFUtil.ProcessCommandError(exception); } else { EFUtil.ProcessEndCommand(); } }
/// <summary> /// Trace after executing reader asynchronously. /// </summary> /// <param name="command">Instance of <see cref="DbCommand"/>.</param> /// <param name="eventData">Instance of <see cref="CommandExecutedEventData"/>.</param> /// <param name="result">Result from <see cref="DbDataReader"/>.</param> /// <param name="cancellationToken">Instance of <see cref="CancellationToken"/>.</param> /// <returns>Task representing the async operation.</returns> public override Task <DbDataReader> ReaderExecutedAsync(DbCommand command, CommandExecutedEventData eventData, DbDataReader result, CancellationToken cancellationToken = default) { EFUtil.ProcessEndCommand(); return(base.ReaderExecutedAsync(command, eventData, result, cancellationToken)); }
/// <summary> /// Trace after executing reader. /// </summary> /// <param name="command">Instance of <see cref="DbCommand"/>.</param> /// <param name="eventData">Instance of <see cref="CommandExecutedEventData"/>.</param> /// <param name="result">Instance of <see cref="DbDataReader"/>.</param> /// <returns>Instance of <see cref="DbDataReader"/>.</returns> public override DbDataReader ReaderExecuted(DbCommand command, CommandExecutedEventData eventData, DbDataReader result) { EFUtil.ProcessEndCommand(); return(base.ReaderExecuted(command, eventData, result)); }
/// <summary> /// Trace after executing scalar asynchronously. /// </summary> /// <param name="command">Instance of <see cref="DbCommand"/>.</param> /// <param name="eventData">Instance of <see cref="CommandExecutedEventData"/>.</param> /// <param name="result">Result object.</param> /// <param name="cancellationToken">Instance of <see cref="CancellationToken"/>.</param> /// <returns>Task representing the async operation.</returns> public override Task <object> ScalarExecutedAsync(DbCommand command, CommandExecutedEventData eventData, object result, CancellationToken cancellationToken = default) { EFUtil.ProcessEndCommand(); return(base.ScalarExecutedAsync(command, eventData, result, cancellationToken)); }
/// <summary> /// Trace after executing scalar. /// </summary> /// <param name="command">Instance of <see cref="DbCommand"/>.</param> /// <param name="eventData">Instance of <see cref="CommandExecutedEventData"/>.</param> /// <param name="result">Result object.</param> /// <returns>Result object.</returns> public override object ScalarExecuted(DbCommand command, CommandExecutedEventData eventData, object result) { EFUtil.ProcessEndCommand(); return(base.ScalarExecuted(command, eventData, result)); }
/// <summary> /// Trace after executing asynchronously. /// </summary> /// <param name="command">Instance of <see cref="DbCommand"/>.</param> /// <param name="eventData">Instance of <see cref="CommandExecutedEventData"/>.</param> /// <param name="result">Result as integer.</param> /// <param name="cancellationToken">Instance of <see cref="CancellationToken"/>.</param> /// <returns>Task representing the async operation.</returns> public override Task <int> NonQueryExecutedAsync(DbCommand command, CommandExecutedEventData eventData, int result, CancellationToken cancellationToken = default) { EFUtil.ProcessEndCommand(); return(base.NonQueryExecutedAsync(command, eventData, result, cancellationToken)); }
/// <summary> /// Trace after executing. /// </summary> /// <param name="command">Instance of <see cref="DbCommand"/>.</param> /// <param name="eventData">Instance of <see cref="CommandExecutedEventData"/>.</param> /// <param name="result">Result as integer.</param> /// <returns>Result as integer.</returns> public override int NonQueryExecuted(DbCommand command, CommandExecutedEventData eventData, int result) { EFUtil.ProcessEndCommand(); return(base.NonQueryExecuted(command, eventData, result)); }