public ActionResult DeleteConfirmed(int id)
        {
            TestFeedback testFeedback = db.TestFeedback.Find(id);

            db.TestFeedback.Remove(testFeedback);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "ID,TestID,StudentID,Feedback")] TestFeedback testFeedback)
 {
     if (ModelState.IsValid)
     {
         db.Entry(testFeedback).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.StudentID = new SelectList(db.Student, "ID", "FirstName", testFeedback.StudentID);
     ViewBag.TestID    = new SelectList(db.Test, "ID", "Name", testFeedback.TestID);
     return(View(testFeedback));
 }
        // GET: TestFeedbacks/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            TestFeedback testFeedback = db.TestFeedback.Find(id);

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

            if (testFeedback == null)
            {
                return(HttpNotFound());
            }
            ViewBag.StudentID = new SelectList(db.Student, "ID", "FirstName", testFeedback.StudentID);
            ViewBag.TestID    = new SelectList(db.Test, "ID", "Name", testFeedback.TestID);
            return(View(testFeedback));
        }