IDbCommandInterceptor.CommandFailed(DbCommand, CommandErrorEventData) 方法

定义

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

public void CommandFailed (System.Data.Common.DbCommand command, Microsoft.EntityFrameworkCore.Diagnostics.CommandErrorEventData eventData);
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
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 Sub CommandFailed (command As DbCommand, eventData As CommandErrorEventData)
Public Overridable Sub CommandFailed (command As DbCommand, eventData As CommandErrorEventData)

参数

command
DbCommand

命令。

eventData
CommandErrorEventData

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

适用于