Beispiel #1
0
        public override async Task <ListarPorTarefaReply> ListarPorTarefa(BaseRequest request, ServerCallContext context)
        {
            Guid id = new Guid(request.Id);
            ListarPorTarefaReply result = new ListarPorTarefaReply();

            result.Lista.AddRange(_mapper.Map <IEnumerable <ImpedimentoTarefaModel> >(_impedimentoTarefaAppService.ListarPorTarefa(id)));

            return(await Task.FromResult(result));
        }
        public async Task <IEnumerable <ImpedimentoTarefaViewModel> > ListarPorTarefaAsync(Guid idTarefa)
        {
            BaseRequest request = new BaseRequest
            {
                Id = idTarefa.ToString()
            };

            ListarPorTarefaReply response = await _client.ListarPorTarefaAsync(request);

            return(_mapper.Map <IEnumerable <ImpedimentoTarefaViewModel> >(response.Lista));
        }