Skip to content

Commit

Permalink
small sorting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tinohager committed Jan 2, 2024
1 parent f95ce64 commit 5d68471
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ public async Task<UserEntity[]> QueryAsync(
query = query.Where(predicate);
}

return await query.Skip(skip).Take(take).ToArrayAsync(cancellationToken);
return await query
.OrderBy(o => o.Id)
.Skip(skip)
.Take(take)
.ToArrayAsync(cancellationToken);
}

public async Task<UserEntity?> GetAsync(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.0" />
<PackageReference Include="Nager.Authentication.AspNet" Version="1.1.0" />
<PackageReference Include="Nager.Authentication.AspNet" Version="1.1.1" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
</ItemGroup>

Expand Down

0 comments on commit 5d68471

Please sign in to comment.