Condividi tramite


IRelationalCommandDiagnosticsLogger.CommandCreating Metodo

Definizione

Registra l'evento CommandCreating .

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

Parametri

connection
IRelationalConnection

Connessione.

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.

commandSource
CommandSource

Origine del comando.

Restituisce

Risultato intercettato.

Si applica a