// GET: Questions/Create
        public async Task <ActionResult> Create()
        {
            var modules = new SelectList(await modulesService.GetAll(), "ModuleId", "ModuleLib");
            var niveaux = new SelectList(await niveauxService.GetAll(), "NiveauId", "NiveauLib");


            var vm = new QuestionCreateUpdateVM()
            {
                AvailableModules = modules,
                AvailableNiveaux = niveaux,
            };



            return(View(vm));
        }
        // GET: Modules/Index
        public async Task <ActionResult> Index()
        {
            var modules = await modulesService.GetAll();

            if (modules == null)
            {
                return(HttpNotFound());
            }

            return(View(modules));
        }
        // GET: Pizzas/Create
        public async Task <ActionResult> Create()
        {
            var module = (await moduleService.GetAll());

            for (int i = 0; i < module.Count; i++)
            {
                module[i].ModuleId = i + 1;
            }

            var candidats = new SelectList(await candidatService.GetAll(), "Id", "Nom");
            var modules   = new SelectList(await moduleService.GetAll(), "ModuleId", "ModuleLib");
            var questions = new SelectList(await questionService.GetAll(), "QuestionId", "QuestionLib");

            //var questions = new SelectList(await questionService.GetAll(), "Param1", "Param2", "...");

            var vm = new QuizzCreateUpdateVM
            {
                AvailableCandidats = candidats,
                AvailableModules   = modules,
                AvailableQuestions = questions
            };

            return(View(vm));
        }