IRelationalCommandDiagnosticsLogger.CommandScalarExecutedAsync 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
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
数据库命令对象。
- connectionId
- Guid
与正在使用的 DbConnection 关联的关联 ID。
- methodResult
- Object
基础方法执行的返回值。
- startTime
- DateTimeOffset
执行开始的时间。
- duration
- TimeSpan
命令执行的持续时间,不包括使用结果。
- commandSource
- CommandSource
命令的源。
- cancellationToken
- CancellationToken
等待 CancellationToken 任务完成时要观察的 。
返回
执行的结果,该结果可能已被侦听器修改。