Language

IRelationalCommandDiagnosticsLogger.CommandScalarExecutedAsync メソッド

定義

オーバーロード

CommandScalarExecutedAsync(IRelationalConnection, DbCommand, String, DbContext, Guid, Guid, Object, DateTimeOffset, TimeSpan, CommandSource, CancellationToken)

ソース:
IRelationalCommandDiagnosticsLogger.cs
ソース:
IRelationalCommandDiagnosticsLogger.cs

CommandExecuted イベントのログ。

public System.Threading.Tasks.ValueTask<object?> CommandScalarExecutedAsync(Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, System.Data.Common.DbCommand command, string logCommandText, Microsoft.EntityFrameworkCore.DbContext? context, Guid commandId, Guid connectionId, object? methodResult, DateTimeOffset startTime, TimeSpan duration, Microsoft.EntityFrameworkCore.Diagnostics.CommandSource commandSource, System.Threading.CancellationToken cancellationToken = default);
abstract member CommandScalarExecutedAsync : Microsoft.EntityFrameworkCore.Storage.IRelationalConnection * System.Data.Common.DbCommand * string * Microsoft.EntityFrameworkCore.DbContext * Guid * Guid * obj * DateTimeOffset * TimeSpan * Microsoft.EntityFrameworkCore.Diagnostics.CommandSource * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<obj>
Public Function CommandScalarExecutedAsync (connection As IRelationalConnection, command As DbCommand, logCommandText As String, context As DbContext, commandId As Guid, connectionId As Guid, methodResult As Object, startTime As DateTimeOffset, duration As TimeSpan, commandSource As CommandSource, Optional cancellationToken As CancellationToken = Nothing) As ValueTask(Of Object)

パラメーター

connection
IRelationalConnection

接続。

command
DbCommand

データベース コマンド オブジェクト。

logCommandText
String

ログに記録できるコマンド テキスト。

context
DbContext

現在使用されている DbContext 。不明な場合は null に設定されます。

commandId
Guid

指定した DbCommandに関連付けられている関連付け ID。

connectionId
Guid

使用されている DbConnection に関連付けられている関連付け ID。

methodResult
Object

基になるメソッドの実行からの戻り値。

startTime
DateTimeOffset

実行が開始された時刻。

duration
TimeSpan

結果の使用を含まない、コマンドの実行時間。

commandSource
CommandSource

コマンドのソース。

cancellationToken
CancellationToken

タスクの完了を待機している間に観察する CancellationToken 。

戻り値

インターセプターによって変更された可能性がある実行の結果。

例外

CancellationTokenが取り消された場合。

適用対象

CommandScalarExecutedAsync(IRelationalConnection, DbCommand, DbContext, Guid, Guid, Object, DateTimeOffset, TimeSpan, CommandSource, CancellationToken)

ソース:
IRelationalCommandDiagnosticsLogger.cs
ソース:
IRelationalCommandDiagnosticsLogger.cs
ソース:
IRelationalCommandDiagnosticsLogger.cs
ソース:
IRelationalCommandDiagnosticsLogger.cs

CommandExecuted イベントのログ。

public System.Threading.Tasks.ValueTask<object?> CommandScalarExecutedAsync(Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, System.Data.Common.DbCommand command, Microsoft.EntityFrameworkCore.DbContext? context, Guid commandId, Guid connectionId, object? methodResult, DateTimeOffset startTime, TimeSpan duration, Microsoft.EntityFrameworkCore.Diagnostics.CommandSource commandSource, System.Threading.CancellationToken cancellationToken = default);
abstract member CommandScalarExecutedAsync : Microsoft.EntityFrameworkCore.Storage.IRelationalConnection * System.Data.Common.DbCommand * Microsoft.EntityFrameworkCore.DbContext * Guid * Guid * obj * DateTimeOffset * TimeSpan * Microsoft.EntityFrameworkCore.Diagnostics.CommandSource * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<obj>
Public Function CommandScalarExecutedAsync (connection As IRelationalConnection, command As DbCommand, context As DbContext, commandId As Guid, connectionId As Guid, methodResult As Object, startTime As DateTimeOffset, duration As TimeSpan, commandSource As CommandSource, Optional cancellationToken As CancellationToken = Nothing) As ValueTask(Of Object)

パラメーター

connection
IRelationalConnection

接続。

command
DbCommand

データベース コマンド オブジェクト。

context
DbContext

現在使用されている DbContext 。不明な場合は null に設定されます。

commandId
Guid

指定した DbCommandに関連付けられている関連付け ID。

connectionId
Guid

使用されている DbConnection に関連付けられている関連付け ID。

methodResult
Object

基になるメソッドの実行からの戻り値。

startTime
DateTimeOffset

実行が開始された時刻。

duration
TimeSpan

結果の使用を含まない、コマンドの実行時間。

commandSource
CommandSource

コマンドのソース。

cancellationToken
CancellationToken

タスクの完了を待機している間に観察する CancellationToken 。

戻り値

インターセプターによって変更された可能性がある実行の結果。

例外

CancellationTokenが取り消された場合。

適用対象