Lenguaje

DbCommandInterceptor.CommandCreated(CommandEndEventData, DbCommand) Método

Definición

Se llama inmediatamente después de que EF llame a CreateCommand().

Se sigue llamando a este método si un interceptor suprimió la creación de un comando en CommandCreating(CommandCorrelatedEventData, InterceptionResult<DbCommand>). En este caso, result es el resultado devuelto por CommandCreating(CommandCorrelatedEventData, InterceptionResult<DbCommand>).

public virtual System.Data.Common.DbCommand CommandCreated(Microsoft.EntityFrameworkCore.Diagnostics.CommandEndEventData eventData, System.Data.Common.DbCommand result);
abstract member CommandCreated : Microsoft.EntityFrameworkCore.Diagnostics.CommandEndEventData * System.Data.Common.DbCommand -> System.Data.Common.DbCommand
override this.CommandCreated : Microsoft.EntityFrameworkCore.Diagnostics.CommandEndEventData * System.Data.Common.DbCommand -> System.Data.Common.DbCommand
Public Overridable Function CommandCreated (eventData As CommandEndEventData, result As DbCommand) As DbCommand

Parámetros

eventData
CommandEndEventData

Información contextual sobre el comando y la ejecución.

result
DbCommand

Resultado de la llamada a CreateCommand(). Este valor se usa normalmente como valor devuelto para la implementación de este método.

Devoluciones

Resultado que EF usará. Una implementación normal de este método para cualquier interceptor que no intente cambiar el resultado es devolver el result valor pasado.

Implementaciones

Se aplica a