I'm simply wondering why there is a IQueryable<T>
version without the generic capability ?
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
- How to know full paths to DLL's from .csproj f
I imagine it's the same reason as Jon Skeet gives in Difference between IEnumerable and IEnumerable<T>? , to allow use in a
foreach
loop.IQuerable
would be castable toIEnumerable
, whereasIQueryable<T>
would not.Also see Marcin's answer about use in dynamic query building scenarios.
by Matt Warren from LINQ: Building an IQueryable Provider - Part I
You should use generic
IQueryable<T>
everywhere it's possible.