次の方法で共有


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>

コマンドに関連付けられているコンテキスト情報。

適用対象