private void OnCommandStop(Exception exception)
 {
     if (exception != null)
     {
         EFUtil.ProcessCommandError(exception);
     }
     else
     {
         EFUtil.ProcessEndCommand();
     }
 }
Пример #2
0
 /// <summary>
 /// Trace after command fails.
 /// </summary>
 /// <param name="command">Instance of <see cref="DbCommand"/>.</param>
 /// <param name="eventData">Instance of <see cref="CommandErrorEventData"/>.</param>
 public override void CommandFailed(DbCommand command, CommandErrorEventData eventData)
 {
     EFUtil.ProcessCommandError(eventData.Exception);
     base.CommandFailed(command, eventData);
 }
Пример #3
0
 /// <summary>
 /// Trace after async command fails.
 /// </summary>
 /// <param name="command">Instance of <see cref="DbCommand"/>.</param>
 /// <param name="eventData">Instance of <see cref="CommandErrorEventData"/>.</param>
 /// <param name="cancellationToken">Instance of <see cref="CancellationToken"/>.</param>
 /// <returns>Task representing the async operation.</returns>
 public override Task CommandFailedAsync(DbCommand command, CommandErrorEventData eventData, CancellationToken cancellationToken = default)
 {
     EFUtil.ProcessCommandError(eventData.Exception);
     return(base.CommandFailedAsync(command, eventData, cancellationToken));
 }