public async Task <IActionResult> AssignTest(int id) { Assignedtest assignedtest = new Assignedtest(); assignedtest.TestId = id; @ViewBag.ListofCustomers = await _apiHandler.GetCustomers(); @ViewBag.ListofSimTest = _apiHandler.GetSimTest(id).Result.TestName; return(View(assignedtest)); }