IDbCommandInterceptor.DataReaderDisposing Method

Definition

Called when execution of a DbDataReader is about to be disposed.

C#
public Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult DataReaderDisposing (System.Data.Common.DbCommand command, Microsoft.EntityFrameworkCore.Diagnostics.DataReaderDisposingEventData eventData, Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult result);
C#
public virtual Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult DataReaderDisposing (System.Data.Common.DbCommand command, Microsoft.EntityFrameworkCore.Diagnostics.DataReaderDisposingEventData eventData, Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult result);

Parameters

command
DbCommand

The command.

eventData
DataReaderDisposingEventData

Contextual information about the command and reader.

result
InterceptionResult

Represents the current result if one exists. This value will have IsSuppressed set to true if some previous interceptor suppressed execution by calling Suppress(). This value is typically used as the return value for the implementation of this method.

Returns

If IsSuppressed is false, then EF will continue as normal. If IsSuppressed is true, then EF will suppress the operation it was about to perform. An implementation of this method for any interceptor that is not attempting to suppress the operation is to return the result value passed in.

Applies to

Toode Versioonid
Entity Framework Core 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0