Inheritance: IPageCriteria, ISortingCriteria
        public void Pick_third_page_with_50_items_orderby_value_desc()
        {
            var criteria = new GridSearchCriteria(pageNumber: 3, pageSize: 50, sortColunName: "Value", ascending: false);
            var result = CreateTestList().AsQueryable().ApplyGridSearchCriteria(criteria);

            Assert.That(result.Items.Count(), Is.EqualTo(50));
            Assert.That(result.Items.First().Value, Is.EqualTo("TestValue050"));
            Assert.That(result.Items.Last().Value, Is.EqualTo("TestValue001"));
        }
 public static ResultPage <T> ApplyGridSearchCriteria <T>(this IQueryable <T> query, GridSearchCriteria criteria)
 {
     return(query.OrderBy(criteria).PickPage(criteria));
 }