语言

DbCommandInterceptor.DataReaderClosing 方法

定义

在 EF 打算调用之前调用 Close()。

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

参数

command
DbCommand

命令。

eventData
DataReaderClosingEventData

有关命令的上下文信息。

result
InterceptionResult

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

返回

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

实现

适用于