Aracılığıyla paylaş


IDbCommandInterceptor.DataReaderClosingAsync Yöntem

Tanım

EF zaman uyumsuz bir bağlamda çağırmayı amaçlamadan hemen önce çağrılır CloseAsync() .

public virtual System.Threading.Tasks.ValueTask<Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult> DataReaderClosingAsync (System.Data.Common.DbCommand command, Microsoft.EntityFrameworkCore.Diagnostics.DataReaderClosingEventData eventData, Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult result);
abstract member DataReaderClosingAsync : System.Data.Common.DbCommand * Microsoft.EntityFrameworkCore.Diagnostics.DataReaderClosingEventData * Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult -> System.Threading.Tasks.ValueTask<Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult>
override this.DataReaderClosingAsync : System.Data.Common.DbCommand * Microsoft.EntityFrameworkCore.Diagnostics.DataReaderClosingEventData * Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult -> System.Threading.Tasks.ValueTask<Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult>
Public Overridable Function DataReaderClosingAsync (command As DbCommand, eventData As DataReaderClosingEventData, result As InterceptionResult) As ValueTask(Of InterceptionResult)

Parametreler

command
DbCommand

Komut.

eventData
DataReaderClosingEventData

Komut 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

ise IsSuppressedfalseEF normal şekilde devam eder. ise IsSuppressedtrue, 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 bir uygulaması, geçirilen değeri döndürmektir result .

Şunlara uygulanır