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