public ActionResult DeleteConfirmed(int id) { STUDIO sTUDIO = db.STUDIO.Find(id); db.STUDIO.Remove(sTUDIO); db.SaveChanges(); return(RedirectToAction("Index")); }
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)); }
public ActionResult Create([Bind(Include = "ID,NAME")] STUDIO sTUDIO) { if (ModelState.IsValid) { db.STUDIO.Add(sTUDIO); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(sTUDIO)); }
// 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)); }