public ActionResult DeleteConfirmed(int id) { GENREs gENREs = db.GENREs.Find(id); db.GENREs.Remove(gENREs); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ID,NAME")] GENREs gENREs) { if (ModelState.IsValid) { db.Entry(gENREs).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(gENREs)); }
public ActionResult Create([Bind(Include = "ID,NAME")] GENREs gENREs) { if (ModelState.IsValid) { db.GENREs.Add(gENREs); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(gENREs)); }
// GET: GENREs/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } GENREs gENREs = db.GENREs.Find(id); if (gENREs == null) { return(HttpNotFound()); } return(View(gENREs)); }