Share via


DatabaseLogFormatter.LogCommand<TResult> 方法

定义

调用 以记录即将执行的命令。 重写此方法以更改命令的记录方式 System.Data.Entity.Infrastructure.Interception.DatabaseLogFormatter.WriteAction

public virtual void LogCommand<TResult> (System.Data.Common.DbCommand command, System.Data.Entity.Infrastructure.Interception.DbCommandInterceptionContext<TResult> interceptionContext);
abstract member LogCommand : System.Data.Common.DbCommand * System.Data.Entity.Infrastructure.Interception.DbCommandInterceptionContext<'Result> -> unit
override this.LogCommand : System.Data.Common.DbCommand * System.Data.Entity.Infrastructure.Interception.DbCommandInterceptionContext<'Result> -> unit
Public Overridable Sub LogCommand(Of TResult) (command As DbCommand, interceptionContext As DbCommandInterceptionContext(Of TResult))

类型参数

TResult

操作结果的类型。

参数

command
DbCommand

要记录的命令。

interceptionContext
DbCommandInterceptionContext<TResult>

与命令关联的上下文信息。

适用于