public IList <Book> FindAll(SortCommand sortCommand = null, IList <FilterCommand> filterCommands = null, PageCommand pageCommand = null) { IQuery query = null; if (!string.IsNullOrWhiteSpace(sortCommand?.SortKey)) { query = ApplySortCommand(sortCommand, query); } if (!ListUtils.IsListNullOrEmpty(filterCommands)) { query = ApplyFilterCommands(filterCommands, query); } if (pageCommand?.Limit > 0 || pageCommand?.Offset > 0) { query = ApplyPageCommand(pageCommand, query); } if (query != null) { return(query.Execute <Book>()); } return(FindAll()); }