Code to apply expression tree directly to List
- by Gamma Vega
Is there a method call in Linq that will apply a expression tree directly on a List<V>? For instance, if I have a expression tree that is built on Order type, and i have a collection of List<Order> items on which i need to apply this expression.
I am looking something similar to:
class OrderListStore : IQueryable<V>,
<other interfaces required to implement custom linq provider>
{
List<Order> orders;
public Expression Expression
{
get { return Expression.Constant(this); }
}
IEnumerator<V> IEnumerable<V>.GetEnumerator()
{
//Here I need to have a method that will take the existing expression
//and directly apply on list
something like this .. Expression.Translate(orders);
}
}
Any help in this regard is highly appreciated.