public ActionResult Edit(Question question)
 {
     if (ModelState.IsValid)
     {
         context.Entry(question).State = EntityState.Modified;
         context.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(question);
 }
 public void InsertOrUpdate(Question question)
 {
     if (question.QuestionId == default(int)) {
         // New entity
         context.Questions.Add(question);
     } else {
         // Existing entity
         context.Entry(question).State = EntityState.Modified;
     }
 }
        public ActionResult Create(Question question)
        {
            if (ModelState.IsValid)
            {
                context.Questions.Add(question);
                context.SaveChanges();
                return RedirectToAction("Index");  
            }

            return View(question);
        }