public GroupDescriptorExpressionBuilderEx(Expression queryable, GroupDescriptor groupDescriptor, GroupDescriptorExpressionBuilderEx childBuilder, Expression notPagedExpression)
     : base(queryable)
 {
     this.groupDescriptor    = groupDescriptor;
     this.childBuilder       = childBuilder;
     this.notPagedExpression = notPagedExpression;
 }
Ejemplo n.º 2
0
        public Expression CreateExpression()
        {
            GroupDescriptorExpressionBuilderEx childBuilder = null;

            foreach (GroupDescriptor groupDescriptor in groupDescriptors.Reverse())
            {
                var builder = new GroupDescriptorExpressionBuilderEx(this.queryable, groupDescriptor, childBuilder, notPagedData);
                //builder.Options.LiftMemberAccessToNull = queryable.Provider.IsLinqToObjectsProvider();
                builder.Options.LiftMemberAccessToNull = false;
                childBuilder = builder;
            }

            if (childBuilder != null)
            {
                return(childBuilder.CreateExpression());
            }

            return(queryable);
        }