Esempio n. 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            STUDIO sTUDIO = db.STUDIO.Find(id);

            db.STUDIO.Remove(sTUDIO);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Esempio n. 2
0
 public ActionResult Edit([Bind(Include = "ID,NAME")] STUDIO sTUDIO)
 {
     if (ModelState.IsValid)
     {
         db.Entry(sTUDIO).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(sTUDIO));
 }
Esempio n. 3
0
        public ActionResult Create([Bind(Include = "ID,NAME")] STUDIO sTUDIO)
        {
            if (ModelState.IsValid)
            {
                db.STUDIO.Add(sTUDIO);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(sTUDIO));
        }
Esempio n. 4
0
        // GET: Studios/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            STUDIO sTUDIO = db.STUDIO.Find(id);

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