我调用了一个 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");
}
};