public async Task <ActionResult> Home(int id) { var laboratory = new LaboratoryViewModel(); var projeto = new ProjetoOutputModel(); using (var client = new HttpClient()) { client.BaseAddress = new Uri(BaseUrl.URL); var response = await client.GetAsync($"api/project/busca?id={id}"); if (response.IsSuccessStatusCode) { var responseContent = await response.Content.ReadAsStringAsync(); projeto = JsonConvert.DeserializeObject <ProjetoOutputModel>(responseContent); var documentos = GetProjetoService.ListaDocumentos(projeto); TempData["IdProjeto"] = projeto.Id; TempData["IdLaboratorio"] = projeto.laboratory.Id; ViewBag.Documentos = documentos; return(View(projeto)); } } return(View()); }