语言

IDbCommandInterceptor.DataReaderClosingAsync 方法

定义

在 EF 打算在异步上下文中调用之前调用 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)

参数

command
DbCommand

命令。

eventData
DataReaderClosingEventData

有关命令的上下文信息。

result
InterceptionResult

表示当前结果(如果存在)。 如果某些以前的拦截器通过调用取消执行,则此值将设置为 < a0/a0> 。 此值通常用作此方法实现的返回值。

返回

false如果是IsSuppressed,则 EF 将照常继续。 true如果是IsSuppressed,则 EF 将禁止执行该操作。 未尝试禁止操作的任何拦截器的此方法的实现是返回 result 传入的值。

适用于