public ActionResult DeleteConfirmed(int id)
        {
            CustomerGallery customerGallery = db.CustomerGalleries.Find(id);

            db.CustomerGalleries.Remove(customerGallery);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "Id,Image1,Image2,Image3,Image4,Image5")] CustomerGallery customerGallery)
 {
     if (ModelState.IsValid)
     {
         db.Entry(customerGallery).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(customerGallery));
 }
        public ActionResult Create([Bind(Include = "Id,Image1,Image2,Image3,Image4,Image5")] CustomerGallery customerGallery)
        {
            if (ModelState.IsValid)
            {
                db.CustomerGalleries.Add(customerGallery);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(customerGallery));
        }
        // GET: CustomerGalleries/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            CustomerGallery customerGallery = db.CustomerGalleries.Find(id);

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