public async Task<ActionResult> Index(FormCollection fc ) { Session["DisableMenu"] = "Yes"; var questions = new List<QuestionModel>(); List<int> ids = new List<int>(); for (int i = 1; i < fc.Count; i++ ) { ids.Add(Convert.ToInt32(fc.Keys.Get(i))); } if (ids.Count < 1) return RedirectToAction("Index", "LocalJobs"); else this.Session.Add("jobIds", ids.ToArray()); using (var client = new DataServiceClient()) { var tempQuestions = await client.getQuestionsAsync(ids.ToArray()); foreach (var question in tempQuestions) { var tempQuestion = new QuestionModel(); tempQuestion.question = question.theQuestion; tempQuestion.correctAnswer = question.theAnswer; questions.Add(tempQuestion); } } return View(questions); }