Update BookController.cs

pull/6809/head
Halil İbrahim Kalkan 5 years ago
parent b318ee8799
commit d8723d2fce

@ -5,7 +5,6 @@ using System.Threading.Tasks;
using AbpPerfTest.WithAbp.Dtos;
using AbpPerfTest.WithAbp.Entities;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Volo.Abp.Domain.Repositories;
namespace AbpPerfTest.WithAbp.Controllers
@ -23,7 +22,7 @@ namespace AbpPerfTest.WithAbp.Controllers
[HttpGet]
public async Task<List<BookDto>> GetListAsync()
{
var books = await (await _bookRepository.GetQueryableAsync()).OrderBy(x => x.Id).Take(10).ToListAsync();
var books = await _bookRepository.GetPagedListAsync(0, 10, "Id");
return books
.Select(b => new BookDto

Loading…
Cancel
Save