Projector parameter is null?

15 views
Skip to first unread message

Jordi Cabré

unread,
Mar 10, 2016, 9:44:35 AM3/10/16
to re-motion Users
As far I've been able to figure out, projection is a way using a Func<> for creating a new instance of another class using the old class information.

In my IQueryExecutor implementation, I'm trying to enable projection using the queryModel.SelectClause.Selector Func in order to take this projector and perform it.

    var projection = Expression.Lambda<Func<T, T>>(queryModel.SelectClause.Selector, Expression.Parameter(typeof(T)));
    var projector = projection.Compile();

The problem appears when I perform this projector. As result of my IQueryExecutor implementation:

   foreach (T q in query.Enumerable<T>())
        yield return projector(q);

As you can see in the herewith attachments, parameter (tc) is null.





Reply all
Reply to author
Forward
0 new messages