public override async Task <ListarPorProjetoReply> ListarPorProjeto(BaseRequest request, ServerCallContext context) { Guid id = new Guid(request.Id); ListarPorProjetoReply result = new ListarPorProjetoReply(); result.Lista.AddRange(_mapper.Map <IEnumerable <RecursoProjetoModel> >(_recursoProjetoAppService.ListarPorProjeto(id))); return(await Task.FromResult(result)); }
public async Task <IEnumerable <RecursoProjetoViewModel> > ListarPorProjetoAsync(Guid idProjeto) { BaseRequest request = new BaseRequest { Id = idProjeto.ToString() }; ListarPorProjetoReply response = await _client.ListarPorProjetoAsync(request); return(_mapper.Map <IEnumerable <RecursoProjetoViewModel> >(response.Lista)); }