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