public async Task <ActionResult> Index(GetAllTestTbsInput input) { var output = await _taskAppService.GetAll(input); var model = new IndexViewModel(output.Items); return(View(model)); }
public async Task <ListResultDto <TestTbListDto> > GetAll(GetAllTestTbsInput input) { var tasks = await _taskRepository .GetAll() .WhereIf(input.State.HasValue, t => t.State == input.State.Value) .OrderByDescending(t => t.CreationTime) .ToListAsync(); return(new ListResultDto <TestTbListDto>( ObjectMapper.Map <List <TestTbListDto> >(tasks) )); }