IRelationalCommandDiagnosticsLogger.CommandReaderExecutingAsync 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
CommandReaderExecutingAsync(IRelationalConnection, DbCommand, DbContext, Guid, Guid, DateTimeOffset, CommandSource, CancellationToken)
活動記錄 CommandExecuting 。
public System.Threading.Tasks.ValueTask<Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult<System.Data.Common.DbDataReader>> CommandReaderExecutingAsync(Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, System.Data.Common.DbCommand command, Microsoft.EntityFrameworkCore.DbContext? context, Guid commandId, Guid connectionId, DateTimeOffset startTime, Microsoft.EntityFrameworkCore.Diagnostics.CommandSource commandSource, System.Threading.CancellationToken cancellationToken = default);
abstract member CommandReaderExecutingAsync : Microsoft.EntityFrameworkCore.Storage.IRelationalConnection * System.Data.Common.DbCommand * Microsoft.EntityFrameworkCore.DbContext * Guid * Guid * DateTimeOffset * Microsoft.EntityFrameworkCore.Diagnostics.CommandSource * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult<System.Data.Common.DbDataReader>>
Public Function CommandReaderExecutingAsync (connection As IRelationalConnection, command As DbCommand, context As DbContext, commandId As Guid, connectionId As Guid, startTime As DateTimeOffset, commandSource As CommandSource, Optional cancellationToken As CancellationToken = Nothing) As ValueTask(Of InterceptionResult(Of DbDataReader))
參數
- connection
- IRelationalConnection
那種連結。
- command
- DbCommand
資料庫指令物件。
- connectionId
- Guid
與所使用的相關性ID DbConnection 相關。
- startTime
- DateTimeOffset
那場處決開始的時間。
- commandSource
- CommandSource
命令來源。
- cancellationToken
- CancellationToken
A CancellationToken 在等待任務完成時觀察。
傳回
一個被截獲的結果。
例外狀況
適用於
CommandReaderExecutingAsync(IRelationalConnection, DbCommand, String, DbContext, Guid, Guid, DateTimeOffset, CommandSource, CancellationToken)
活動記錄 CommandExecuting 。
public System.Threading.Tasks.ValueTask<Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult<System.Data.Common.DbDataReader>> CommandReaderExecutingAsync(Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, System.Data.Common.DbCommand command, string logCommandText, Microsoft.EntityFrameworkCore.DbContext? context, Guid commandId, Guid connectionId, DateTimeOffset startTime, Microsoft.EntityFrameworkCore.Diagnostics.CommandSource commandSource, System.Threading.CancellationToken cancellationToken = default);
abstract member CommandReaderExecutingAsync : Microsoft.EntityFrameworkCore.Storage.IRelationalConnection * System.Data.Common.DbCommand * string * Microsoft.EntityFrameworkCore.DbContext * Guid * Guid * DateTimeOffset * Microsoft.EntityFrameworkCore.Diagnostics.CommandSource * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult<System.Data.Common.DbDataReader>>
Public Function CommandReaderExecutingAsync (connection As IRelationalConnection, command As DbCommand, logCommandText As String, context As DbContext, commandId As Guid, connectionId As Guid, startTime As DateTimeOffset, commandSource As CommandSource, Optional cancellationToken As CancellationToken = Nothing) As ValueTask(Of InterceptionResult(Of DbDataReader))
參數
- connection
- IRelationalConnection
那種連結。
- command
- DbCommand
資料庫指令物件。
- logCommandText
- String
可以記錄的指令文字。
- connectionId
- Guid
與所使用的相關性ID DbConnection 相關。
- startTime
- DateTimeOffset
那場處決開始的時間。
- commandSource
- CommandSource
命令來源。
- cancellationToken
- CancellationToken
A CancellationToken 在等待任務完成時觀察。
傳回
一個被截獲的結果。