public async Task <IActionResult> Index(int studentId) { using (var httpClient = ClientFactory.CreateClient("GeorestApi")) { var georestClient = new GeorestClient(httpClient.BaseAddress.ToString(), httpClient); ViewBag.StudentLabs = await georestClient.GetLabsForStudentAsync(studentId); } return(View()); }