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