예제 #1
0
        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()));
        }
예제 #2
0
        public IActionResult GetTestList([FromQuery] GetTestInput input)
        {
            var result = _testService.GetTestList(input);

            return(Ok(ResponseBody.From(result)));
        }
예제 #3
0
 public Task <Page <GetTestOutput> > GetTestList(GetTestInput input)
 {
     throw new System.NotImplementedException();
 }