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