public ActionResult Upload(int galleryId)
 {
     var photo = new Photo
     {
         GalleryId = galleryId
     };
     return View(photo);
 }
        public ActionResult Edit(Photo model, int id)
        {
            if (!ModelState.IsValid) return View(model);

            _photoService.UpdatePhoto(id, model);

            return RedirectToAction("Details", "Galleries", new { Id =  model.GalleryId });
        }
        public ActionResult Upload(Photo model, HttpPostedFileBase image)
        {
            if (!ModelState.IsValid) return View(model);

            var path = SavePhotoService.UploadPhoto(image);
            _photoService.AddPhotoToGallery(path, model);

            return RedirectToAction("Details", "Galleries", new { Id = model.GalleryId });
        }