コード例 #1
0
        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"));
        }
コード例 #2
0
 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));
 }
コード例 #3
0
        // 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));
        }
コード例 #4
0
        // 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));
        }