語言

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 若未知,則用來消除。

commandId
Guid

與給定 DbCommand相關的相關係數 ID 。

connectionId
Guid

與所使用的相關性ID DbConnection 相關。

methodResult
Object

底層方法執行的回傳值。

startTime
DateTimeOffset

那場處決開始的時間。

duration
TimeSpan

指令執行的時間長短,不包括結果的消費時間。

commandSource
CommandSource

命令來源。

cancellationToken
CancellationToken

A 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 若未知,則用來消除。

commandId
Guid

與給定 DbCommand相關的相關係數 ID 。

connectionId
Guid

與所使用的相關性ID DbConnection 相關。

methodResult
Object

底層方法執行的回傳值。

startTime
DateTimeOffset

那場處決開始的時間。

duration
TimeSpan

指令執行的時間長短,不包括結果的消費時間。

commandSource
CommandSource

命令來源。

cancellationToken
CancellationToken

A CancellationToken 在等待任務完成時觀察。

傳回

執行結果,可能被攔截器修改過。

例外狀況

適用於