我称之为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");
}
};
答案 0 :(得分:0)