IRelationalCommandDiagnosticsLogger.CommandError 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
CommandError事件的記錄。
public void CommandError (Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, System.Data.Common.DbCommand command, Microsoft.EntityFrameworkCore.DbContext? context, Microsoft.EntityFrameworkCore.Diagnostics.DbCommandMethod executeMethod, Guid commandId, Guid connectionId, Exception exception, DateTimeOffset startTime, TimeSpan duration, Microsoft.EntityFrameworkCore.Diagnostics.CommandSource commandSource);
abstract member CommandError : Microsoft.EntityFrameworkCore.Storage.IRelationalConnection * System.Data.Common.DbCommand * Microsoft.EntityFrameworkCore.DbContext * Microsoft.EntityFrameworkCore.Diagnostics.DbCommandMethod * Guid * Guid * Exception * DateTimeOffset * TimeSpan * Microsoft.EntityFrameworkCore.Diagnostics.CommandSource -> unit
Public Sub CommandError (connection As IRelationalConnection, command As DbCommand, context As DbContext, executeMethod As DbCommandMethod, commandId As Guid, connectionId As Guid, exception As Exception, startTime As DateTimeOffset, duration As TimeSpan, commandSource As CommandSource)
參數
- connection
- IRelationalConnection
連接。
- command
- DbCommand
資料庫命令物件。
- executeMethod
- DbCommandMethod
表示將呼叫以執行命令的方法。
- connectionId
- Guid
與使用中相關聯的 DbConnection 相互關聯識別碼。
- exception
- Exception
造成此失敗的例外狀況。
- startTime
- DateTimeOffset
開始執行的時間。
- duration
- TimeSpan
在引發例外狀況之前所經過的時間量。
- commandSource
- CommandSource
命令的來源。