Skip to content

Commit

Permalink
Update Part-10.md
Browse files Browse the repository at this point in the history
  • Loading branch information
hikalkan committed Jan 22, 2021
1 parent a6d6158 commit 4963930
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions docs/en/Tutorials/Part-10.md
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,12 @@ namespace Acme.BookStore.Books

public override async Task<PagedResultDto<BookDto>> GetListAsync(PagedAndSortedResultRequestDto input)
{
//Set a default sorting, if not provided
if (input.Sorting.IsNullOrWhiteSpace())
{
input.Sorting = nameof(Book.Name);
}

//Get the IQueryable<Book> from the repository
var queryable = await Repository.GetQueryableAsync();

Expand Down Expand Up @@ -489,8 +495,6 @@ namespace Acme.BookStore.Books

public async override Task<BookDto> GetAsync(Guid id)
{
await CheckGetPolicyAsync();

var book = await Repository.GetAsync(id);
var bookDto = ObjectMapper.Map<Book, BookDto>(book);

Expand All @@ -503,8 +507,6 @@ namespace Acme.BookStore.Books
public async override Task<PagedResultDto<BookDto>>
GetListAsync(PagedAndSortedResultRequestDto input)
{
await CheckGetListPolicyAsync();

//Set a default sorting, if not provided
if (input.Sorting.IsNullOrWhiteSpace())
{
Expand Down

0 comments on commit 4963930

Please sign in to comment.