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