DbCommandInterceptor.DataReaderDisposing 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
在即将释放执行某个 DbDataReader 操作时调用。
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
override this.DataReaderDisposing : System.Data.Common.DbCommand * Microsoft.EntityFrameworkCore.Diagnostics.DataReaderDisposingEventData * Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult -> Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult
Public Overridable Function DataReaderDisposing (command As DbCommand, eventData As DataReaderDisposingEventData, result As InterceptionResult) As InterceptionResult
参数
- command
- DbCommand
命令。
- eventData
- DataReaderDisposingEventData
有关命令和读取器的上下文信息。
- result
- InterceptionResult
表示当前结果(如果存在)。
如果某些以前的拦截器通过调用
返回
如果 IsSuppressed 为 false,EF 将照常继续。
如果 IsSuppressed 为 true,则 EF 将禁止执行该操作。
未尝试禁止操作的任何拦截器的此方法的正常实现是返回 result 传入的值。