我有一个 WCF 数据服务,我的客户端是一个 WPF 应用程序。
我的 WCF 数据服务中有一个服务操作。类似的东西
[WebGet]
public IQueryable<VSuppliersExtra> GetAllVSuppliers()
{
List<VSuppliersExtra> lstVsup = new List<VSuppliersExtra>();
// add some VSuppliersExtra entities to the list
........
return lstVsup.AsQueryable<VSuppliersExtra>();
}
在我的客户中,我有
oCollection = new ObservableCollection<VSuppliersExtra>(jp.CreateQuery<VSuppliersExtra>("GetAllVSuppliers"));
//Open a new window Change collection and update the changes in the DB
.......
//run the same query again
.......
oCollection = new ObservableCollection<VSuppliersExtra>(jp.CreateQuery<VSuppliersExtra>("GetAllVSuppliers"));
现在,一切正常,但第二次调用服务操作将始终让我得到相同的结果而无需更改,直到我重新启动我的应用程序。
我检查了数据库,我所有的更改都保存到了 SQL 服务器,我检查了服务中的函数,它确实返回了更新的数据......但我得到了相同的结果集!!!!客户端有缓存吗???