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