語言

DatabaseLogFormatter.LogParameter<TResult> 方法

定義

呼叫 來 LogCommand<TResult>(DbCommand, DbCommandInterceptionContext<TResult>) 記錄每個參數。 此方法可從覆寫的實作 LogCommand<TResult>(DbCommand, DbCommandInterceptionContext<TResult>) 呼叫至 log 參數,及/或覆寫以改變參數的 log 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

要記錄的參數。

適用於