public ActionResult Edit(EditQuestionViewModel model)
        {
            if (ModelState.IsValid)
            {
                Question edittedQuestion = _questionRepo.Questions.Where(q => q.QuestionID == model.QuestionID).FirstOrDefault();
                edittedQuestion.Category = model.Category;
                edittedQuestion.Gender = model.Gender;
                edittedQuestion.QuestionOptions.ElementAt(0).OptionText = model.Option1;
                edittedQuestion.QuestionOptions.ElementAt(1).OptionText = model.Option2;
                _questionRepo.SaveQuestion(edittedQuestion);

                return RedirectToAction("ToDoQuestions");
            }

            return View(model);
        }
        public ActionResult Edit(int qid = 0)
        {
            if (qid == 0)
            {
                return RedirectToAction("404", "Error");
            }

            Question question = _questionRepo.Questions.Where(q => q.QuestionID == qid).FirstOrDefault();
            EditQuestionViewModel model = new EditQuestionViewModel();
            model.Category = question.Category.HasValue ? question.Category.Value : 0;
            model.Gender = question.Gender;
            model.Option1 = question.QuestionOptions.ElementAt(0).OptionText;
            model.Option2 = question.QuestionOptions.ElementAt(1).OptionText;
            model.QuestionID = question.QuestionID;

            return View(model);
        }