entity-framework-6 - 使用 BrightIdeasSoftware 的 ObjectListView 时,ObjectContext 实例已被释放
问题描述
尝试为列表添加过滤器。我有一个文本框和一个在文本框文本更改时执行此操作的事件:
this.objectListView1.ModelFilter = TextMatchFilter.Contains(this.objectListView1, filterString.Text);
当我在文本框中键入一个字符时,我收到以下错误:
System.ObjectDisposedException: 'The ObjectContext instance has been disposed and can no longer be used for operations that require a connection.'
我正在使用实体框架来获取列表视图的数据。当带有列表视图的表单加载时,我使用一种方法填充我的数据。
是什么导致了错误?我该如何纠正?
解决方案
推荐阅读
- javascript - CSS 样式中的 JS 树自定义
- java - Serenity 将错误的定义传递给参数
- android - React Native:“只有创建视图层次结构的原始线程才能触摸它的视图”
- c# - C# DataFlow:等待 ConcurrentExclusiveSchedulerPair 启动的所有任务完成
- c# - UWP C# 图像(UI 元素)碰撞检测问题
- xamarin - 工具栏 xamarin 表单中的标签
- powerbuilder - 一个文本文件有多少行数据
- python - 是否可以从 Django 管理页面禁用缓存?
- ios - sap.m.pdfViewer 在 iPhone 中无法正常工作
- ios - iOS 远程通知处理 app 活动情况