加载操作卡在获取100000条记录wcf ria services silverlight

时间:2012-09-27 09:59:57

标签: wpf wcf silverlight wcf-ria-services

我称之为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");
                }
            };

1 个答案:

答案 0 :(得分:0)

您可以传递多少数据。也许检查一下如何改变它

How do I increase the amount of data I can pass back from a RIA Service?

还有这个

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