public ActionResult DeleteConfirmed(int id) { vid_rating vid_rating = db.vid_rating.Find(id); db.vid_rating.Remove(vid_rating); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Vid_rating_id,Vid_id,U_id,Vid_rating1")] vid_rating vid_rating) { if (ModelState.IsValid) { db.Entry(vid_rating).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.Vid_id = new SelectList(db.videos, "Vid_id", "Vid_title", vid_rating.Vid_id); return(View(vid_rating)); }
// GET: vid_rating/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } vid_rating vid_rating = db.vid_rating.Find(id); if (vid_rating == null) { return(HttpNotFound()); } return(View(vid_rating)); }
// GET: vid_rating/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } vid_rating vid_rating = db.vid_rating.Find(id); if (vid_rating == null) { return(HttpNotFound()); } ViewBag.Vid_id = new SelectList(db.videos, "Vid_id", "Vid_title", vid_rating.Vid_id); return(View(vid_rating)); }