Пример #1
0
    public async Task <IEnumerable <TarefaViewModel> > Handle(ListTarefaQuery request, CancellationToken cancellationToken)
    {
        IEnumerable <TarefaViewModel> result = _mapper.Map <IEnumerable <TarefaViewModel> >(await _unitOfWork.TarefaRepository.AllAsync(request.GetDependencies));

        await PreencherDadosAdicionaisAsync(result);

        return(result);
    }
 public async UnaryResult <IEnumerable <TarefaViewModel> > AllAsync(ListTarefaQuery query)
 {
     return(await _mediator.Send(query));
 }