开发者

Silverlight ObservableCollection cannot get data from EntityQuery

I am trying to g开发者_运维问答et data that are returned from an EntityQuery

public EntityQuery<Product> GetProductsQuery()

and I am using an ObservableCollection to store them

var query = ctx.GetProductsQuery();
        ctx.Load(query, op =>
                             {
                                 var data = op.Entities;
                                 ProductList = new ObservableCollection<Product>(op.Entities);

                                 return;
                             }, null);

but after this code, the ProductList is still empty


Here are a couple of links hope they shed more light on your issue. They describe how to load data from RIA serives into ObservableCollections

Loading WCF RIA Services Query results to an ObservableCollection

Loading Data from RIA Services

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜