0

我调用了一个 wcf ria 服务函数,它返回超过 100,000 条记录。当我调试代码时,该函数返回的对象需要正常时间来加载这么多记录。但是当在视图模型的加载操作的回调函数中时,它会无限期地卡在那里。任何人都可以请指导我。

请检查下面我的视图模型的代码...

EntityQuery<DataSetData> KPIPivotGridViewDataQuery = GridDataContext.GetPivotGridViewKPIDataQuery(KPIInfo.KPI_Id, srcTableName, HelperMethods.GetLanguageID(), dateCol, StDate, EdDate);
            LoadOperation<DataSetData> loPivotGridViewDataQuery =   GridDataContext.Load(KPIPivotGridViewDataQuery);

            loPivotGridViewDataQuery.Completed += (sender, e) =>
            {
                LoadOperation<DataSetData> vals = sender as LoadOperation<DataSetData>;
                if (!vals.HasError)
                {
                    DataSetData data = vals.Entities.FirstOrDefault();
                    IEnumerable KPIPivotGridViewData = DynamicDataBuilder.GetDataList(data);
                    this.PivotGridViewPagedView = new RadGVPagging(KPIPivotGridViewData);//new ObservableCollection<object>(KPIPivotGridViewData.Cast<object>());

                    this.isBusy = false;
                }
                else
                {
                    this.isBusy = false;
                    //this.BIChart.IsBusy = false;
                    SilverlightMessageBox.ShowErrorDialog(vals.Error.Message, rm.GetString("msgErrorHeading", CultureInfo.CurrentUICulture));
                    ISFLogging.AddLog(vals.Error.Message, "GetPivotGridViewData.loChartDataQuery_Completed");
                }
            };
4

1 回答 1

0

您可以传递的数据量是有限制的。也许检查一下如何改变它

如何增加可以从 RIA 服务传回的数据量?

还有这个

http://forums.silverlight.net/t/148523.aspx

于 2012-09-27T13:40:06.257 回答