public async Task <PagedResultDto <GetTestDto> > GetTests(GetTestInput input) { var query = from t in _testManager.TestRepository.GetAll() where t.Task.Contains(input.Task) orderby input.Sorting select new { t }; var totalCount = await query.CountAsync(); var items = await query.PageBy(input).ToListAsync(); return(new PagedResultDto <GetTestDto>( totalCount, items.Select( item => { var dto = item.t.MapTo <GetTestDto>(); return dto; } ).ToList())); }
public IActionResult GetTestList([FromQuery] GetTestInput input) { var result = _testService.GetTestList(input); return(Ok(ResponseBody.From(result))); }
public Task <Page <GetTestOutput> > GetTestList(GetTestInput input) { throw new System.NotImplementedException(); }