IQueryable的< T>和ienumerable< T>和变种 [英] Iqueryable<T> and ienumerable<T> and var
本文介绍了IQueryable的< T>和ienumerable< T>和变种的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
任何人都可以用简单的话来解释这个问题
IQueryable< t>
和
IEnumerable< t>
我的尝试:
即例如
这三者之间有什么区别
IEnumerable< int> scoreQuery = // 查询变量
来自得分 得分 // required
其中得分> 80 // 可选
orderby 得分降序 // 可选
选择得分;
var scorequery = 来自得分 得分其中得分> 80 ord得分降序
选择得分
IQueryable< int> scoreQuery = // 查询变量
来自得分 得分 // required
其中得分> 80 // 可选
orderby 得分降序 // 可选
选择得分;
解决方案
我建议阅读这篇非常有趣的文章来自CP知识库: IEnumerable Vs IQueryable [ ^ ]
其他资源:
c# - 返回IEnumerable& lt; T& gt; vs IQueryable& lt; T& gt; - Stack Overflow [ ^ ]
linq - What&#39; s IQueryable和IEnumerable之间的差异 - 堆栈溢出 [ ^ ]
.net - IQueryable< T>之间有什么区别?和IEnumerable< T>? - 堆栈溢出 [ ^ ]
can anyone please explain this in simple words
IQueryable<t>
and
IEnumerable<t>
What I have tried:
i.e. for example
what is the difference between these 3
IEnumerable<int> scoreQuery = //query variable
from score in scores //required
where score > 80 // optional
orderby score descending // optional
select score;
var scorequery = from score in scores where score>80 order by score descending
select score
IQueryable<int> scoreQuery = //query variable
from score in scores //required
where score > 80 // optional
orderby score descending // optional
select score;
解决方案
I'd suggest to read this very interesting article comes from CP Knowledge Base: IEnumerable Vs IQueryable[^]
Other resources:
c# - Returning IEnumerable<T> vs IQueryable<T> - Stack Overflow[^]
linq - What's the difference between IQueryable and IEnumerable - Stack Overflow[^]
.net - What is the difference between IQueryable<T> and IEnumerable<T>? - Stack Overflow[^]
这篇关于IQueryable的< T>和ienumerable< T>和变种的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文