Exemple #1
0
        private IQueryable GetListQueryable()
        {
            IQueryable <T> unorderedQuery = DataFacade.GetData <T>();

            if (typeof(IPageRelatedData).IsAssignableFrom(typeof(T)))
            {
                unorderedQuery = unorderedQuery.Where(t => (t as IPageRelatedData).PageId == _pageId);
            }

            return(DataGroupingProviderHelper.OrderData(unorderedQuery, typeof(T)));
        }
        private IQueryable GetDataQueryable()
        {
            IQueryable unorderedQuery;

            if (typeof(IPageRelatedData).IsAssignableFrom(_dataType))
            {
                unorderedQuery = (IQueryable)_getFilteredDataQueryableMethodInfo.MakeGenericMethod(_dataType)
                                 .Invoke(null, new object[] { _pageId });
            }
            else
            {
                unorderedQuery = DataFacade.GetData(_dataType);
            }

            return(DataGroupingProviderHelper.OrderData(unorderedQuery, _dataType));
        }