SaveChangesInterceptor Clase

Definición

Clase base abstracta para ISaveChangesInterceptor su uso al implementar un subconjunto de los métodos de interfaz.

public abstract class SaveChangesInterceptor : Microsoft.EntityFrameworkCore.Diagnostics.ISaveChangesInterceptor
type SaveChangesInterceptor = class
    interface ISaveChangesInterceptor
    interface IInterceptor
Public MustInherit Class SaveChangesInterceptor
Implements ISaveChangesInterceptor
Herencia
SaveChangesInterceptor
Implementaciones

Comentarios

Consulte interceptores de EF Core para obtener más información y ejemplos.

Constructores

SaveChangesInterceptor()

Clase base abstracta para ISaveChangesInterceptor su uso al implementar un subconjunto de los métodos de interfaz.

Métodos

SaveChangesCanceled(DbContextEventData)

Se llama cuando DbContext.SaveChanges se canceló.

SaveChangesCanceledAsync(DbContextEventData, CancellationToken)

Se llama cuando DbContext.SaveChangesAsync se canceló.

SaveChangesFailed(DbContextErrorEventData)

Se llama cuando se produce una excepción en DbContext.SaveChanges.

SaveChangesFailedAsync(DbContextErrorEventData, CancellationToken)

Se llama cuando se produce una excepción en DbContext.SaveChangesAsync.

SavedChanges(SaveChangesCompletedEventData, Int32)

Se llama al final de DbContext.SaveChanges.

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

SavedChangesAsync(SaveChangesCompletedEventData, Int32, CancellationToken)

Se llama al final de DbContext.SaveChangesAsync.

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

SavingChanges(DbContextEventData, InterceptionResult<Int32>)

Se llama al principio de DbContext.SaveChanges.

SavingChangesAsync(DbContextEventData, InterceptionResult<Int32>, CancellationToken)

Se llama al principio de DbContext.SaveChangesAsync.

ThrowingConcurrencyException(ConcurrencyExceptionEventData, InterceptionResult)

Se llama inmediatamente antes de que EF inicie una DbUpdateConcurrencyExceptionexcepción .

ThrowingConcurrencyExceptionAsync(ConcurrencyExceptionEventData, InterceptionResult, CancellationToken)

Se llama inmediatamente antes de que EF inicie una DbUpdateConcurrencyExceptionexcepción .

Se aplica a