private void OnCommandStop(Exception exception)
 {
     if (exception != null)
     {
         EFUtil.ProcessCommandError(exception);
     }
     else
     {
         EFUtil.ProcessEndCommand();
     }
 }
Esempio n. 2
0
 /// <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));
 }
Esempio n. 3
0
 /// <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));
 }
Esempio n. 4
0
 /// <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));
 }
Esempio n. 5
0
 /// <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));
 }
Esempio n. 6
0
 /// <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));
 }
Esempio n. 7
0
 /// <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));
 }