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