RelationalLoggerExtensions.CommandReaderExecutedAsync 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
CommandExecuted事件的記錄。
public static System.Threading.Tasks.Task<System.Data.Common.DbDataReader> CommandReaderExecutedAsync (this Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Command> diagnostics, Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, System.Data.Common.DbCommand command, Microsoft.EntityFrameworkCore.DbContext context, Guid commandId, Guid connectionId, System.Data.Common.DbDataReader methodResult, DateTimeOffset startTime, TimeSpan duration, System.Threading.CancellationToken cancellationToken = default);
public static System.Threading.Tasks.ValueTask<System.Data.Common.DbDataReader> CommandReaderExecutedAsync (this Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Command> diagnostics, Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, System.Data.Common.DbCommand command, Microsoft.EntityFrameworkCore.DbContext context, Guid commandId, Guid connectionId, System.Data.Common.DbDataReader methodResult, DateTimeOffset startTime, TimeSpan duration, System.Threading.CancellationToken cancellationToken = default);
static member CommandReaderExecutedAsync : Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Command> * Microsoft.EntityFrameworkCore.Storage.IRelationalConnection * System.Data.Common.DbCommand * Microsoft.EntityFrameworkCore.DbContext * Guid * Guid * System.Data.Common.DbDataReader * DateTimeOffset * TimeSpan * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Data.Common.DbDataReader>
static member CommandReaderExecutedAsync : Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Command> * Microsoft.EntityFrameworkCore.Storage.IRelationalConnection * System.Data.Common.DbCommand * Microsoft.EntityFrameworkCore.DbContext * Guid * Guid * System.Data.Common.DbDataReader * DateTimeOffset * TimeSpan * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<System.Data.Common.DbDataReader>
<Extension()>
Public Function CommandReaderExecutedAsync (diagnostics As IDiagnosticsLogger(Of DbLoggerCategory.Database.Command), connection As IRelationalConnection, command As DbCommand, context As DbContext, commandId As Guid, connectionId As Guid, methodResult As DbDataReader, startTime As DateTimeOffset, duration As TimeSpan, Optional cancellationToken As CancellationToken = Nothing) As Task(Of DbDataReader)
<Extension()>
Public Function CommandReaderExecutedAsync (diagnostics As IDiagnosticsLogger(Of DbLoggerCategory.Database.Command), connection As IRelationalConnection, command As DbCommand, context As DbContext, commandId As Guid, connectionId As Guid, methodResult As DbDataReader, startTime As DateTimeOffset, duration As TimeSpan, Optional cancellationToken As CancellationToken = Nothing) As ValueTask(Of DbDataReader)
參數
- diagnostics
- IDiagnosticsLogger<DbLoggerCategory.Database.Command>
要使用的診斷記錄器。
- connection
- IRelationalConnection
連接。
- command
- DbCommand
資料庫命令物件。
- connectionId
- Guid
與使用中相關聯的 DbConnection 相互關聯識別碼。
- methodResult
- DbDataReader
基礎方法執行的傳回值。
- startTime
- DateTimeOffset
開始執行的時間。
- duration
- TimeSpan
命令執行的持續時間,不包括取用結果。
- cancellationToken
- CancellationToken
取消語彙基元。
傳回
執行的結果,可能已經由攔截器修改。