Which ORM tools support this version of Queryable.

2019-08-01 23:52发布

问题:

Do you know an ORM supporting this extension method:

public static IQueryable<TResult> Select<TSource, TResult>(
  this IQueryable<TSource> source, 
  Expression<Func<TSource, int, TResult>> selector)

Basically, it allows to add row number (index of result in sequence) to the projection. Example of its usage with IEnumerable is here. But the same method exists for IQueryable.

So I'm curious, is there any ORM tool that supports this method?

The question is actually related to this one.

回答1:

You can certainly use it with LINQ to Entities. Since it's just icing over the standard Select, I would presume that any IQueryable provider which supports Select would also work with it.

Bear in mind, though: It's not the row number, as evidenced by the fact that it's an Int32. It's an index, which isn't the same thing.



回答2:

No examples, so most likely there is no such ORM.