如何显示linq select的所有结果 [英] How can I display all results from linq select

查看:731
本文介绍了如何显示linq select的所有结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好。

我有一个无法解决的问题,因为我无法理解我做错了什么。

我有一个asp网web表单和listview就可以了,我使用实体框架从ms sql表中获取数据。

但是当我看到结果时,我看不到带有样本第一个字段(人的id)的行。

如何显示所有结果?

我的代码:

  return 结果()。OrderBy(I = >  I.requestN)。其中(p = >  p.actual ==  1 
.Skip((CurrentPage - 1 )* pageSize)
.Take(pageSize) ;





我尝试过:



我试图改变行名,试图改变代码,listview代码,代码隐藏。

解决方案

似乎你想删除分页和过滤。



所以,替换它:

  return 结果() .OrderBy(I = >  I.requestN)。其中(p = >  p.actual = =  1 
.Skip((CurrentPage - 1 )* pageSize)
。取(pageSize);





with:

  return 结果()。OrderBy(I = >  I.requestN); 


Hi to all.
I have a problem that i can't resolve , because i can't understand what i doing wrong.
I have an asp net web form and listview on it and i take data from ms sql table using entity framework .
But when i see result i can't see rows with sample first field (id of person) .
How can i display All results ?
My code:

return  Result().OrderBy(I => I.requestN).Where(p => p.actual == 1)
                .Skip((CurrentPage - 1) * pageSize)
             .Take(pageSize);



What I have tried:

I tried to change row names, tried to change code , listview code, codebehind .

解决方案

Seems you want to remove paging and filter.

So, replace this:

return  Result().OrderBy(I => I.requestN).Where(p => p.actual == 1)
                .Skip((CurrentPage - 1) * pageSize)
             .Take(pageSize);



with:

return  Result().OrderBy(I => I.requestN);


这篇关于如何显示linq select的所有结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆