public void FilterOrderByItemByNameTest() { Func <Expression, Expression> predicateGenerator = param => Expression.LessThan(Expression.Property(param, "Id"), Expression.Constant(9)); MemberAssignment[] assignments = new MemberAssignment[] { sourceParam.BindOrderedFilteredItem <ObjectE, ObjectA, int, ObjectB>("ObjectB", "ListOfA", "Id", predicateGenerator, ObjectB.FromObjectA) }; ObjectE obj = listOfObjectD.Select(Expression.Lambda <Func <ObjectD, ObjectE> >( Expression.MemberInit(Expression.New(typeof(ObjectE)), assignments) , sourceParam).Compile()).FirstOrDefault(); Assert.IsNotNull(obj.ObjectB); Assert.AreEqual(1, obj.ObjectB.Id); }