public ActionResult DeleteConfirmed(int id)
        {
            QuestionResultFeedback questionResultFeedback = db.QuestionResultFeedback.Find(id);

            db.QuestionResultFeedback.Remove(questionResultFeedback);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "ID,QuestionResultID,TeacherID,Text")] QuestionResultFeedback questionResultFeedback)
 {
     if (ModelState.IsValid)
     {
         db.Entry(questionResultFeedback).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.QuestionResultID = new SelectList(db.QuestionResult, "ID", "AnswerText", questionResultFeedback.QuestionResultID);
     ViewBag.TeacherID        = new SelectList(db.Teacher, "ID", "FirstName", questionResultFeedback.TeacherID);
     return(View(questionResultFeedback));
 }
        // GET: QuestionResultFeedbacks/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            QuestionResultFeedback questionResultFeedback = db.QuestionResultFeedback.Find(id);

            if (questionResultFeedback == null)
            {
                return(HttpNotFound());
            }
            return(View(questionResultFeedback));
        }
        // GET: QuestionResultFeedbacks/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            QuestionResultFeedback questionResultFeedback = db.QuestionResultFeedback.Find(id);

            if (questionResultFeedback == null)
            {
                return(HttpNotFound());
            }
            ViewBag.QuestionResultID = new SelectList(db.QuestionResult, "ID", "AnswerText", questionResultFeedback.QuestionResultID);
            ViewBag.TeacherID        = new SelectList(db.Teacher, "ID", "FirstName", questionResultFeedback.TeacherID);
            return(View(questionResultFeedback));
        }