public async Task <IActionResult> Edit(int id, [Bind("ExaminationId,Id,IsActive,Title,QuestionNo,Instructions")] ExamSetUp examSetUp)
        {
            if (id != examSetUp.ExaminationId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(examSetUp);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!ExamSetUpExists(examSetUp.ExaminationId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["Id"] = new SelectList(_context.AdmClass, "Id", "ClassName", examSetUp.Id);
            return(View(examSetUp));
        }
        public async Task <IActionResult> Create([Bind("ExaminationId,Id,IsActive,Title,QuestionNo,Instructions")] ExamSetUp examSetUp)
        {
            if (ModelState.IsValid)
            {
                _context.Add(examSetUp);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["Id"] = new SelectList(_context.AdmClass, "Id", "ClassName", examSetUp.Id);
            return(View(examSetUp));
        }