public static DataFilter <T> ListByFilter <T>(
            this BaseDataAccess <T> dataAccess, DataFilter <T> filter)
            where T : BaseModel
        {
            DataFilterGroup rootParamGroup = filter.ParamGroup;

            IQueryable <T> filteredQuery = GetFilteredQuery(dataAccess.GetBaseQueryable(), rootParamGroup, filter);

            if (filter.CustomQueryExpression != null)
            {
                filteredQuery = filteredQuery.Where(filter.CustomQueryExpression);
            }
            filteredQuery = GetOrderedQuery(filteredQuery, filter);

            if (filter.Paginated)
            {
                int skipSize = (filter.Page - 1) * filter.PageSize;
                filter.Data = filteredQuery.Skip(skipSize).Take(filter.PageSize).ToList();
            }
            else
            {
                filter.Data = filteredQuery.ToList();
            }

            filter.TotalCount = filteredQuery.Count();

            return(filter);
        }