示例#1
0
        public ActionResult DeleteConfirmed(int id)
        {
            TestMovieTable testMovieTable = db.TestMovieTables.Find(id);

            db.TestMovieTables.Remove(testMovieTable);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
示例#2
0
 public ActionResult Edit([Bind(Include = "Id,ISAN,Year,Description,Rating,Runtime,ProducerID,GenreID")] TestMovieTable testMovieTable)
 {
     if (ModelState.IsValid)
     {
         db.Entry(testMovieTable).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(testMovieTable));
 }
示例#3
0
        public ActionResult Create([Bind(Include = "Id,ISAN,Year,Description,Rating,Runtime,ProducerID,GenreID")] TestMovieTable testMovieTable)
        {
            if (ModelState.IsValid)
            {
                db.TestMovieTables.Add(testMovieTable);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(testMovieTable));
        }
示例#4
0
        // GET: Movie/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            TestMovieTable testMovieTable = db.TestMovieTables.Find(id);

            if (testMovieTable == null)
            {
                return(HttpNotFound());
            }
            return(View(testMovieTable));
        }