Share via


ISaveChangesInterceptor.SavedChanges Method

Definition

Called at the end of DbContext.SaveChanges.

public int SavedChanges (Microsoft.EntityFrameworkCore.Diagnostics.SaveChangesCompletedEventData eventData, int result);
public virtual int SavedChanges (Microsoft.EntityFrameworkCore.Diagnostics.SaveChangesCompletedEventData eventData, int result);
abstract member SavedChanges : Microsoft.EntityFrameworkCore.Diagnostics.SaveChangesCompletedEventData * int -> int
abstract member SavedChanges : Microsoft.EntityFrameworkCore.Diagnostics.SaveChangesCompletedEventData * int -> int
override this.SavedChanges : Microsoft.EntityFrameworkCore.Diagnostics.SaveChangesCompletedEventData * int -> int
Public Function SavedChanges (eventData As SaveChangesCompletedEventData, result As Integer) As Integer
Public Overridable Function SavedChanges (eventData As SaveChangesCompletedEventData, result As Integer) As Integer

Parameters

eventData
SaveChangesCompletedEventData

Contextual information about the DbContext being used.

result
Int32

The result of the call to DbContext.SaveChanges. This value is typically used as the return value for the implementation of this method.

Returns

The result that EF will use. An implementation of this method for any interceptor that is not attempting to change the result is to return the result value passed in.

Remarks

This method is still called if an interceptor suppressed creation of a command in SavingChanges(DbContextEventData, InterceptionResult<Int32>). In this case, result is the result returned by SavingChanges(DbContextEventData, InterceptionResult<Int32>).

Applies to