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