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