public async Task <IEnumerable <TarefaViewModel> > Handle(GetByRecursoQuery request, CancellationToken cancellationToken) { IEnumerable <TarefaViewModel> result = _mapper.Map <IEnumerable <TarefaViewModel> >(await _unitOfWork.TarefaRepository.GetByRecursoAsync(request.IdRecurso)); await PreencherDadosAdicionaisAsync(result); return(result); }
public async UnaryResult <IEnumerable <ApontamentoViewModel> > GetByRecursoAsync(GetByRecursoQuery query) { return(await _mediator.Send(query)); }
public async Task <IEnumerable <ApontamentoViewModel> > Handle(GetByRecursoQuery request, CancellationToken cancellationToken) { IEnumerable <ApontamentoViewModel> result = _mapper.Map <IEnumerable <ApontamentoViewModel> >(await _unitOfWork.ApontamentoRepository.GetByRecursoAsync(request.IdRecurso)); return(result); }