Silverlight ObservableCollection无法从EntityQuery获取数据
我正在尝试获取从EntityQuery返回的数据Silverlight ObservableCollection无法从EntityQuery获取数据,silverlight,observablecollection,Silverlight,Observablecollection,我正在尝试获取从EntityQuery返回的数据 public EntityQuery<Product> GetProductsQuery() public EntityQuery GetProductsQuery() 我用一个可观察的集合来存储它们 var query = ctx.GetProductsQuery(); ctx.Load(query, op => {
public EntityQuery<Product> GetProductsQuery()
public EntityQuery GetProductsQuery()
我用一个可观察的集合来存储它们
var query = ctx.GetProductsQuery();
ctx.Load(query, op =>
{
var data = op.Entities;
ProductList = new ObservableCollection<Product>(op.Entities);
return;
}, null);
var query=ctx.GetProductsQuery();
加载(查询,op=>
{
var数据=经营实体;
ProductList=新的ObservableCollection(op.Entities);
返回;
},空);
但是在这段代码之后,ProductList仍然是空的这里有几个链接,希望它们能对您的问题提供更多的帮助。它们描述了如何将RIA序列中的数据加载到ObservableCollections中