IQueryable vs IQueryable

前端 未结 2 610
隐瞒了意图╮
隐瞒了意图╮ 2020-12-19 09:36

I\'m simply wondering why there is a IQueryable version without the generic capability ?

2条回答
  •  别那么骄傲
    2020-12-19 10:15

    The generic IQueryable is the one you use most often in method signatures and the like. The non-generic IQueryable exist primarily to give you a weakly typed entry point primarily for dynamic query building scenarios.

    by Matt Warren from LINQ: Building an IQueryable Provider - Part I

    You should use generic IQueryable everywhere it's possible.

提交回复
热议问题