public ActionResult DeleteConfirmed(int id)
        {
            PhotoArea photoArea = db.PhotoAreas.Find(id);

            db.PhotoAreas.Remove(photoArea);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "Id,Photo,Title")] PhotoArea photoArea)
 {
     if (ModelState.IsValid)
     {
         db.Entry(photoArea).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(photoArea));
 }
        public ActionResult Create([Bind(Include = "Id,Photo,Title")] PhotoArea photoArea)
        {
            if (ModelState.IsValid)
            {
                db.PhotoAreas.Add(photoArea);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(photoArea));
        }
        // GET: Admin/PhotoAreas/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            PhotoArea photoArea = db.PhotoAreas.Find(id);

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