首页 新闻 会员 周边

报这样错是什么原因呢!对于类型筛选操作不是有效的元数据类型。求解!

0
悬赏园豆:15 [已关闭问题] 关闭于 2014-07-06 08:22

 [HttpGet]
        public JsonResult GetListInfo(string rid, string sidx, string sord, int page, int rows)
        {
            var jqGridResponse = new JqGridResponse<IdeIdentEit> { PageIndex = page, PageSize = rows };
            IQueryable<IdeIdentEit> data = noteRepository.GetListByRid(rid);
            jqGridResponse.TotalRecordsCount = data.Count();
            var pagedViewModel = new PagedViewModel<IdeIdentEit>
            {
                Query = data.OfType<IdeIdentEit>(),
                GridSortOptions = new GridSortOptions { Column = sidx, Direction = sord.Equals("asc") ? SortDirection.Ascending : SortDirection.Descending },
                DefaultSortColumn = sidx,
                Page = page,
                PageSize = rows,
            }
           .Setup();         
            pagedViewModel.PagedList.AsParallel().ToList().ForEach(p => DomainObjectToJson(jqGridResponse, p));
          

但又是获得了8条数据的。分页时出错了,我是把新建立了一个实体表IdeIdentEit,放入了两张表的字段,现在是把两张表的数据部分展现到Jqgrid上。数据得到了,但会出这个错,怎么回事,求解??
            return jqGridResponse.ToJsonResult();
        }

代码如上,最后这里报的错 pagedViewModel.PagedList.AsParallel().ToList().ForEach(p => DomainObjectToJson(jqGridResponse, p));

renshen4322的主页 renshen4322 | 初学一级 | 园豆:5
提问于:2014-07-04 10:34
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册