public async Task <PaginationResponse <AuthorDto> > Get(int page_size = 10, int current_page = 1, Sort sort = Sort.Ascending, string column = null) { AuthorPaginationDto authorPagination = await _authorService.Find(page_size, current_page, sort, CaseConverter.ToTitleCase(column)); return(PaginationResponse <AuthorDto> .Get(_httpContextAccessor, authorPagination.Total, page_size, current_page, sort, authorPagination.Authors)); }
public async Task <PaginationResponse <BookDto> > Get(int page_size = 10, int current_page = 1, Sort sort = Sort.Ascending, string column = null, string author_id = null) { BookPaginationDto books = await _bookService.Find(page_size, current_page, sort, CaseConverter.ToTitleCase(column), author_id); return(PaginationResponse <BookDto> .Get(_httpContextAccessor, books.Total, page_size, current_page, sort, books.Books)); }