Share via


DbCommandInterceptor.DataReaderClosingAsync Method

Definition

Called just before EF intends to call CloseAsync() in an async context.

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)

Parameters

command
DbCommand

The command.

eventData
DataReaderClosingEventData

Contextual information about the command.

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.

Implements

Applies to