Share via


DatabaseLogFormatter.LogParameter<TResult> 方法

定义

调用 以 LogCommand<TResult>(DbCommand, DbCommandInterceptionContext<TResult>) 记录每个参数。 此方法可以从 的重写实现 LogCommand<TResult>(DbCommand, DbCommandInterceptionContext<TResult>) 调用来记录参数,和/或可以重写以更改记录 System.Data.Entity.Infrastructure.Interception.DatabaseLogFormatter.WriteAction参数的方式。

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

类型参数

TResult

操作结果的类型。

参数

command
DbCommand

正在记录的命令。

interceptionContext
DbCommandInterceptionContext<TResult>

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

parameter
DbParameter

要记录的参数。

适用于