DbCommandInterceptor.CommandFailed(DbCommand, CommandErrorEventData) 方法

定义

当命令执行失败并出现异常时调用。

public virtual void CommandFailed (System.Data.Common.DbCommand command, Microsoft.EntityFrameworkCore.Diagnostics.CommandErrorEventData eventData);
abstract member CommandFailed : System.Data.Common.DbCommand * Microsoft.EntityFrameworkCore.Diagnostics.CommandErrorEventData -> unit
override this.CommandFailed : System.Data.Common.DbCommand * Microsoft.EntityFrameworkCore.Diagnostics.CommandErrorEventData -> unit
Public Overridable Sub CommandFailed (command As DbCommand, eventData As CommandErrorEventData)

参数

command
DbCommand

命令。

eventData
CommandErrorEventData

有关命令和执行的上下文信息。

实现

适用于