Condividi tramite


IRelationalCommandDiagnosticsLogger.CommandCreated Metodo

Definizione

Registra l'evento CommandCreated .

public System.Data.Common.DbCommand CommandCreated (Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, System.Data.Common.DbCommand command, Microsoft.EntityFrameworkCore.Diagnostics.DbCommandMethod commandMethod, Microsoft.EntityFrameworkCore.DbContext? context, Guid commandId, Guid connectionId, DateTimeOffset startTime, TimeSpan duration, Microsoft.EntityFrameworkCore.Diagnostics.CommandSource commandSource);
abstract member CommandCreated : Microsoft.EntityFrameworkCore.Storage.IRelationalConnection * System.Data.Common.DbCommand * Microsoft.EntityFrameworkCore.Diagnostics.DbCommandMethod * Microsoft.EntityFrameworkCore.DbContext * Guid * Guid * DateTimeOffset * TimeSpan * Microsoft.EntityFrameworkCore.Diagnostics.CommandSource -> System.Data.Common.DbCommand
Public Function CommandCreated (connection As IRelationalConnection, command As DbCommand, commandMethod As DbCommandMethod, context As DbContext, commandId As Guid, connectionId As Guid, startTime As DateTimeOffset, duration As TimeSpan, commandSource As CommandSource) As DbCommand

Parametri

connection
IRelationalConnection

Connessione.

command
DbCommand

Oggetto comando del database.

commandMethod
DbCommandMethod

Tipo di metodo che verrà chiamato su questo comando.

context
DbContext

Oggetto DbContext attualmente usato, per null se non noto.

commandId
Guid

ID di correlazione associato all'oggetto specificato DbCommand.

connectionId
Guid

ID di correlazione associato all'oggetto DbConnection usato.

startTime
DateTimeOffset

Ora in cui è iniziata l'esecuzione.

duration
TimeSpan

Durata della creazione del comando.

commandSource
CommandSource

Origine del comando.

Restituisce

Risultato intercettato.

Si applica a