public async Task <IActionResult> Access() { List <Employee> employees = new List <Employee>(); HttpClient client34 = cs.EmployeeDetails(); HttpResponseMessage res = await client34.GetAsync("api/Employees"); if (res.IsSuccessStatusCode) { var result = res.Content.ReadAsStringAsync().Result; employees = JsonConvert.DeserializeObject <List <Employee> >(result); } return(View(employees)); }