Exemple #1
0
        public async Task <ActionResult> Index(GetAllTestTbsInput input)
        {
            var output = await _taskAppService.GetAll(input);

            var model = new IndexViewModel(output.Items);

            return(View(model));
        }
Exemple #2
0
        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)
                       ));
        }