HighwayFramework / Highway.Data

The fastest and smoothest way to great architecture
http://hwyfwk.com
MIT License
72 stars 30 forks source link

Apply Appended Expressions to the Projector, rather than the Selector, in Selector/Projector queries. #120

Closed ericburcham-eprod closed 3 years ago

ericburcham-eprod commented 3 years ago

In Query<TSelection, TProjection>.AppendExpressions, any Expressions added to QueryBase.ExpressionList are appended to TSelection rather than TProjector. This throws an ArgumentException similar to this:

System.ArgumentException: Expression of type 'System.Linq.IQueryable1[TSelector]' cannot be used for parameter of type 'System.Linq.IQueryable1[TProjector]' of method 'System.Linq.IQueryable1[TProjector]

I have altered the class to that Expressions are instead applied to TProjector.