IDbConnectionInterceptor.ConnectionDisposingAsync Yöntem
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
EF zaman uyumsuz bir bağlamda çağırmayı amaçlamadan hemen önce çağrılır DisposeAsync() .
public virtual System.Threading.Tasks.ValueTask<Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult> ConnectionDisposingAsync(System.Data.Common.DbConnection connection, Microsoft.EntityFrameworkCore.Diagnostics.ConnectionEventData eventData, Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult result);
abstract member ConnectionDisposingAsync : System.Data.Common.DbConnection * Microsoft.EntityFrameworkCore.Diagnostics.ConnectionEventData * Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult -> System.Threading.Tasks.ValueTask<Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult>
override this.ConnectionDisposingAsync : System.Data.Common.DbConnection * Microsoft.EntityFrameworkCore.Diagnostics.ConnectionEventData * Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult -> System.Threading.Tasks.ValueTask<Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult>
Public Overridable Function ConnectionDisposingAsync (connection As DbConnection, eventData As ConnectionEventData, result As InterceptionResult) As ValueTask(Of 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ı tarafından çağrılarak trueSuppress()yürütme engellendiyse bu değer olarak ayarlanmış olacaktırIsSuppressed.
Bu değer genellikle bu yöntemin uygulanması için dönüş değeri olarak kullanılır.
Döndürülenler
ise IsSuppressedfalse, EF normal şekilde devam eder.
ise IsSuppressedtrueEF, gerçekleştirmek üzere olduğu işlemi gizler.
İşlemi gizlemeye çalışmayan herhangi bir kesme noktası için bu yöntemin bir uygulaması, geçirilen değeri döndürmektir result .