Usage

using LinqExpressionProjection.Test.Model; private Expression<Func<Project, double>> averageAreaSelector = p => p.Subprojects.Average(p => p.Area); var projects = (from p in ctx.Projects.AsExpressionProjectable()
select new
{
Project = p,
AverageArea = averageAreaSelector.Project<double>()
}).ToArray();

Make sure the selection expression <TIn> is of the same type as the projection (Select() call) lambda parameter