示例#1
0
        internal IQueryable <T> ApplyBinding <T>(IQueryable <T> modelQuery)
        {
            var query = modelQuery;

            try
            {
                query = BaseModel.ApplyFilter(query, Request.Query["filter"]);
            }
            catch (InvalidFilterFieldException e)
            {
                exceptions.Add(e);
            }

            ResponseCount = query.Count();

            try
            {
                query = BaseModel.ApplySort(query, Request.Query["sort"], Request.Query["orderBy"]);
            }
            catch (InvalidSortFieldException e2)
            {
                exceptions.Add(e2);
            }

            query = ApplyPaging(query);

            return(query);
        }