共用方式為


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>

與命令相關聯的內容資訊。

適用於