コード例 #1
0
        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));
        }
コード例 #2
0
        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));
        }