public ActionResult CreateQuestion(CreateQuestionVM questionVM)
        {
            if (ModelState.IsValid)
            {
                QuestionVM newQuestion = questionVM.question;
                questionService.AddQuestion(newQuestion);

                return(RedirectToAction("Index", questionService.GetAllQuestions().ToList()));
            }
            return(View(questionVM));
        }
        public ActionResult CreateQuestion()
        {
            // kulturalnie trzeba to zrobić a nie w kontrolerze

            CreateQuestionVM vm = new CreateQuestionVM();

            var categories = questionService.GetAllCategories();
            var qTypes     = questionService.GetAllQuestionTypes();

            vm.Categories = categories.Select(d => new SelectListItem
            {
                Value = d.categoryID.ToString(),
                Text  = d.categoryName
            });

            vm.questionTypes = qTypes.Select(d => new SelectListItem
            {
                Value = d.questionTypeID.ToString(),
                Text  = d.typeName
            });

            return(View(vm));
        }