共用方式為


IRelationalCommandDiagnosticsLogger.CommandScalarExecuted 方法

定義

CommandExecuted事件的記錄。

public object? CommandScalarExecuted (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);
abstract member CommandScalarExecuted : Microsoft.EntityFrameworkCore.Storage.IRelationalConnection * System.Data.Common.DbCommand * Microsoft.EntityFrameworkCore.DbContext * Guid * Guid * obj * DateTimeOffset * TimeSpan * Microsoft.EntityFrameworkCore.Diagnostics.CommandSource -> obj
Public Function CommandScalarExecuted (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) As Object

參數

connection
IRelationalConnection

連接。

command
DbCommand

資料庫命令物件。

context
DbContext

DbContext目前使用的 ,如果不知道,則為 null。

commandId
Guid

與指定 DbCommand 相關聯的相互關聯識別碼。

connectionId
Guid

DbConnection 所使用 關聯的相互關聯識別碼。

methodResult
Object

基礎方法執行的傳回值。

startTime
DateTimeOffset

開始執行的時間。

duration
TimeSpan

命令執行的持續時間,不包括取用結果。

commandSource
CommandSource

命令的來源。

傳回

執行的結果,可能已經由攔截器修改。

適用於