IDbCommandInterceptor.DataReaderDisposing Metode
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Dipanggil ketika eksekusi a DbDataReader akan dibuang.
public Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult DataReaderDisposing (System.Data.Common.DbCommand command, Microsoft.EntityFrameworkCore.Diagnostics.DataReaderDisposingEventData eventData, Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult result);
public virtual Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult DataReaderDisposing (System.Data.Common.DbCommand command, Microsoft.EntityFrameworkCore.Diagnostics.DataReaderDisposingEventData eventData, Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult result);
abstract member DataReaderDisposing : System.Data.Common.DbCommand * Microsoft.EntityFrameworkCore.Diagnostics.DataReaderDisposingEventData * Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult -> Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult
abstract member DataReaderDisposing : System.Data.Common.DbCommand * Microsoft.EntityFrameworkCore.Diagnostics.DataReaderDisposingEventData * Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult -> Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult
override this.DataReaderDisposing : System.Data.Common.DbCommand * Microsoft.EntityFrameworkCore.Diagnostics.DataReaderDisposingEventData * Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult -> Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult
Public Function DataReaderDisposing (command As DbCommand, eventData As DataReaderDisposingEventData, result As InterceptionResult) As InterceptionResult
Public Overridable Function DataReaderDisposing (command As DbCommand, eventData As DataReaderDisposingEventData, result As InterceptionResult) As InterceptionResult
Parameter
- command
- DbCommand
Perintah.
- eventData
- DataReaderDisposingEventData
Informasi kontekstual tentang perintah dan pembaca.
- result
- InterceptionResult
Mewakili hasil saat ini jika ada.
Nilai ini akan diatur IsSuppressed ke true
jika beberapa pencegat sebelumnya menekan eksekusi dengan memanggil Suppress().
Nilai ini biasanya digunakan sebagai nilai pengembalian untuk implementasi metode ini.
Mengembalikan
Jika IsSuppressed adalah false
, maka EF akan berlanjut seperti biasa.
Jika IsSuppressed adalah true
, maka EF akan menekan operasi yang akan dilakukannya.
Implementasi metode ini untuk setiap pencegat yang tidak mencoba menekan operasi adalah mengembalikan nilai yang result
diteruskan.
Berlaku untuk
Entity Framework