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