예제 #1
0
 public GroupDescriptorExpressionBuilder(IQueryable queryable, GroupDescriptor groupDescriptor, GroupDescriptorExpressionBuilder childBuilder, IQueryable notPagedData)
     : base(queryable)
 {
     this.groupDescriptor = groupDescriptor;
     this.childBuilder    = childBuilder;
     this.notPagedData    = notPagedData;
 }
예제 #2
0
        public IQueryable CreateQuery()
        {
            GroupDescriptorExpressionBuilder childBuilder = null;

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

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

            return(queryable);
        }