public ActionResult DeleteConfirmed(int id)
        {
            Accessoy accessoy = db.Accessoies.Find(id);

            db.Accessoies.Remove(accessoy);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "AccessoryID,Name,Photo,Type,Color,Season,Occasion")] Accessoy accessoy)
 {
     if (ModelState.IsValid)
     {
         db.Entry(accessoy).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(accessoy));
 }
        public ActionResult Create([Bind(Include = "AccessoryID,Name,Photo,Type,Color,Season,Occasion")] Accessoy accessoy)
        {
            if (ModelState.IsValid)
            {
                db.Accessoies.Add(accessoy);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(accessoy));
        }
        // GET: Accessoys/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Accessoy accessoy = db.Accessoies.Find(id);

            if (accessoy == null)
            {
                return(HttpNotFound());
            }
            return(View(accessoy));
        }