Jazyk

IDbConnectionInterceptor.ConnectionClosing Metoda

Definice

Volal těsně před EF hodlá volat Close().

public virtual Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult ConnectionClosing(System.Data.Common.DbConnection connection, Microsoft.EntityFrameworkCore.Diagnostics.ConnectionEventData eventData, Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult result);
public Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult ConnectionClosing(System.Data.Common.DbConnection connection, Microsoft.EntityFrameworkCore.Diagnostics.ConnectionEventData eventData, Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult result);
abstract member ConnectionClosing : System.Data.Common.DbConnection * Microsoft.EntityFrameworkCore.Diagnostics.ConnectionEventData * Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult -> Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult
override this.ConnectionClosing : System.Data.Common.DbConnection * Microsoft.EntityFrameworkCore.Diagnostics.ConnectionEventData * Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult -> Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult
abstract member ConnectionClosing : System.Data.Common.DbConnection * Microsoft.EntityFrameworkCore.Diagnostics.ConnectionEventData * Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult -> Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult
Public Overridable Function ConnectionClosing (connection As DbConnection, eventData As ConnectionEventData, result As InterceptionResult) As InterceptionResult
Public Function ConnectionClosing (connection As DbConnection, eventData As ConnectionEventData, result As InterceptionResult) As InterceptionResult

Parametry

connection
DbConnection

Připojení.

eventData
ConnectionEventData

Kontextové informace o připojení.

result
InterceptionResult

Představuje aktuální výsledek, pokud existuje. Tato hodnota bude nastavena IsSuppressed , true pokud některé předchozí zachytávání potlačí provádění voláním Suppress(). Tato hodnota se obvykle používá jako návratová hodnota pro implementaci této metody.

Návraty

Pokud IsSuppressed ano false, ef bude pokračovat jako normální. Pokud IsSuppressed ano true, ef potlačí operaci, kterou se chystá provést. Implementace této metody pro jakýkoli průsečík, který se nepokouší potlačit operaci, je vrátit result hodnotu předanou.

Platí pro