Aracılığıyla paylaş


DbConnectionInterceptor.ConnectionClosing Yöntem

Tanım

EF çağrısı yapmadan hemen önce çağrılır Close().

public virtual 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
Public Overridable Function ConnectionClosing (connection As DbConnection, eventData As ConnectionEventData, result As InterceptionResult) As InterceptionResult

Parametreler

connection
DbConnection

Bağlantı.

eventData
ConnectionEventData

Bağlantı hakkında bağlamsal bilgiler.

result
InterceptionResult

Varsa geçerli sonucu temsil eder. Önceki bir kesme noktası çağrısı Suppress()yaparak yürütmeyi engellediyse bu değer IsSuppressed olarak ayarlanırtrue. Bu değer genellikle bu yöntemin uygulanması için dönüş değeri olarak kullanılır.

Döndürülenler

False IsSuppressed ise EF normal şekilde devam eder. Doğruysa IsSuppressed EF, gerçekleştirmek üzere olduğu işlemi bastırır. İşlemi gizlemeye çalışmayan herhangi bir kesme noktası için bu yöntemin normal bir uygulaması, geçirilen değeri döndürmektir result .

Uygulamalar

Şunlara uygulanır